Skip to content

Use keymap from session unless env set.#2169

Open
ninetailedtori wants to merge 5 commits into
ValveSoftware:masterfrom
ninetailedtori:keyborb
Open

Use keymap from session unless env set.#2169
ninetailedtori wants to merge 5 commits into
ValveSoftware:masterfrom
ninetailedtori:keyborb

Conversation

@ninetailedtori
Copy link
Copy Markdown

Fixes #203.

Unfortunately I cannot fetch the rules from the keymap once it's compiled, and since the session's keymap fetched is pre-compiled by the session, it is not something I can fetch. Thus, if an env is set, we will rebuild the entire keymap w.r.t the env vars, or sensible defaults. Do let me know if it IS possible to fix this though!

I welcome testing and reviews on this, mighta cocked something up!! (though I hope not xD)

Signed-off-by: Toria <ninetailedtori@uwu.gal>
@ninetailedtori
Copy link
Copy Markdown
Author

Attempt given! Hopefully this is the correct method, canonically? But I do welcome advice @wismill if I've cocked up my somewhat shoddy understanding of libxkbcommon! 🙏🏽

Copy link
Copy Markdown

@wismill wismill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick review. I am not familiar with the code base to contribute further.

Comment thread src/wlserver.cpp Outdated
Comment thread src/wlserver.cpp Outdated
Comment thread src/wlserver.cpp Outdated
Comment thread src/wlserver.cpp Outdated
Comment thread src/wlserver.cpp
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Comment thread src/wlserver.cpp Outdated
…hat whole if-chain block so it looks cleaner and is efficient with the new checks. Remove a redundant check too. If only env_variant is set of all env vars, we discard the value and continue in p_keymap attempt. Just small optimizations outside of that!

Signed-off-by: Toria <ninetailedtori@uwu.gal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import keyboard layout from parent session in nested mode

3 participants