mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
Merge branch 'DreamMaoMao:main' into main
This commit is contained in:
commit
1341f843e9
4 changed files with 10 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue