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

@ -1051,6 +1051,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
(*arg).v = strdup(arg_value); (*arg).v = strdup(arg_value);
} else if (strcmp(func_name, "switch_keyboard_layout") == 0) { } else if (strcmp(func_name, "switch_keyboard_layout") == 0) {
func = switch_keyboard_layout; func = switch_keyboard_layout;
(*arg).i = CLAMP_INT(atoi(arg_value), 0, 100);
} else if (strcmp(func_name, "setlayout") == 0) { } else if (strcmp(func_name, "setlayout") == 0) {
func = setlayout; func = setlayout;
(*arg).v = strdup(arg_value); (*arg).v = strdup(arg_value);

View file

@ -915,7 +915,13 @@ int32_t switch_keyboard_layout(const Arg *arg) {
wlr_log(WLR_INFO, "Only one layout available"); wlr_log(WLR_INFO, "Only one layout available");
return 0; 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 // 6. Apply new keymap
uint32_t depressed = keyboard->modifiers.depressed; uint32_t depressed = keyboard->modifiers.depressed;

View file

@ -374,6 +374,7 @@ void scroller(Monitor *m) {
bool need_apply_overspread = bool need_apply_overspread =
scroller_prefer_overspread && m->visible_scroll_tiling_clients > 1 && scroller_prefer_overspread && m->visible_scroll_tiling_clients > 1 &&
(focus_client_index == 0 || focus_client_index == n - 1) &&
tempClients[focus_client_index]->scroller_proportion < 1.0f; tempClients[focus_client_index]->scroller_proportion < 1.0f;
if (need_apply_overspread) { if (need_apply_overspread) {

View file

@ -358,6 +358,7 @@ void vertical_scroller(Monitor *m) {
bool need_apply_overspread = bool need_apply_overspread =
scroller_prefer_overspread && m->visible_scroll_tiling_clients > 1 && scroller_prefer_overspread && m->visible_scroll_tiling_clients > 1 &&
(focus_client_index == 0 || focus_client_index == n - 1) &&
tempClients[focus_client_index]->scroller_proportion < 1.0f; tempClients[focus_client_index]->scroller_proportion < 1.0f;
if (need_apply_overspread) { if (need_apply_overspread) {