Merge branch 'DreamMaoMao:main' into main

This commit is contained in:
Ricardo Squassina Lee 2026-02-19 07:07:50 -03:00 committed by GitHub
commit 1341f843e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 1 deletions

View file

@ -915,7 +915,13 @@ int32_t switch_keyboard_layout(const Arg *arg) {
wlr_log(WLR_INFO, "Only one layout available");
return 0;
}
xkb_layout_index_t next = (current + 1) % num_layouts;
xkb_layout_index_t next = 0;
if (arg->i > 0 && arg->i <= num_layouts) {
next = arg->i - 1;
} else {
next = (current + 1) % num_layouts;
}
// 6. Apply new keymap
uint32_t depressed = keyboard->modifiers.depressed;