From 28ab0e6343a701d552a755ff41ff128a42ede8a8 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 28 Nov 2025 11:34:48 +0800 Subject: [PATCH 1/8] opt: re-judge the focus strategy of the layer when re-arrangelayer --- src/mango.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mango.c b/src/mango.c index 8a27b75..02b6ffc 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1563,6 +1563,7 @@ void reset_exclusive_layer(Monitor *m) { unsigned int layers_above_shell[] = { ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, ZWLR_LAYER_SHELL_V1_LAYER_TOP, + ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, }; if (!m) @@ -1570,6 +1571,16 @@ void reset_exclusive_layer(Monitor *m) { for (i = 0; i < (int)LENGTH(layers_above_shell); i++) { wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) { + if (l == exclusive_focus && + l->layer_surface->current.keyboard_interactive != + ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE) + exclusive_focus = NULL; + if (l->layer_surface->current.keyboard_interactive == + ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE && + l->layer_surface->surface == + seat->keyboard_state.focused_surface) + focusclient(focustop(selmon), 1); + if (locked || l->layer_surface->current.keyboard_interactive != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE || From b768f72eaa82eec6ea75811e2a45253671eda472 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 28 Nov 2025 12:42:18 +0800 Subject: [PATCH 2/8] opt: allow ime in on-demand layer --- src/mango.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mango.c b/src/mango.c index 02b6ffc..ee3b428 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2227,6 +2227,8 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) { l->layer_surface->current.keyboard_interactive == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) { focusclient(NULL, 0); + dwl_im_relay_set_focus(dwl_input_method_relay, + l->layer_surface->surface); client_notify_enter(l->layer_surface->surface, wlr_seat_get_keyboard(seat)); } From 16368a8781b278fd76eb3757dc9692967e9db19f Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 28 Nov 2025 12:49:06 +0800 Subject: [PATCH 3/8] opt: optimize code struct --- src/mango.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/mango.c b/src/mango.c index ee3b428..016f06c 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1557,6 +1557,12 @@ void apply_window_snap(Client *c) { resize(c, c->geom, 0); } +void focuslayer(LayerSurface *l) { + focusclient(NULL, 0); + dwl_im_relay_set_focus(dwl_input_method_relay, l->layer_surface->surface); + client_notify_enter(l->layer_surface->surface, wlr_seat_get_keyboard(seat)); +} + void reset_exclusive_layer(Monitor *m) { LayerSurface *l = NULL; int i; @@ -1587,12 +1593,8 @@ void reset_exclusive_layer(Monitor *m) { !l->mapped || l == exclusive_focus) continue; /* Deactivate the focused client. */ - focusclient(NULL, 0); exclusive_focus = l; - dwl_im_relay_set_focus(dwl_input_method_relay, - l->layer_surface->surface); - client_notify_enter(l->layer_surface->surface, - wlr_seat_get_keyboard(seat)); + focuslayer(l); return; } } @@ -1893,11 +1895,7 @@ buttonpress(struct wl_listener *listener, void *data) { if (l && !exclusive_focus && l->layer_surface->current.keyboard_interactive == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) { - focusclient(NULL, 0); - dwl_im_relay_set_focus(dwl_input_method_relay, - l->layer_surface->surface); - client_notify_enter(l->layer_surface->surface, - wlr_seat_get_keyboard(seat)); + focuslayer(l); } } @@ -2226,11 +2224,7 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) { if (!exclusive_focus && l->layer_surface->current.keyboard_interactive == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) { - focusclient(NULL, 0); - dwl_im_relay_set_focus(dwl_input_method_relay, - l->layer_surface->surface); - client_notify_enter(l->layer_surface->surface, - wlr_seat_get_keyboard(seat)); + focuslayer(l); } } From 006cf46c52467ba44b7a0e23cc4a981c0f34e9dc Mon Sep 17 00:00:00 2001 From: Rexiel Scarlet <37258415+Rexcrazy804@users.noreply.github.com> Date: Sun, 23 Nov 2025 20:20:47 +0400 Subject: [PATCH 4/8] feat: support transparent wlr session lock --- src/config/parse_config.h | 5 +++++ src/config/preset.h | 1 + src/mango.c | 8 ++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/config/parse_config.h b/src/config/parse_config.h index a58a106..b750c7c 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -339,6 +339,7 @@ typedef struct { int adaptive_sync; int allow_tearing; int allow_shortcuts_inhibit; + int transparent_wlr_lock; struct xkb_rule_names xkb_rules; @@ -1221,6 +1222,8 @@ void parse_option(Config *config, char *key, char *value) { config->allow_tearing = atoi(value); } else if (strcmp(key, "allow_shortcuts_inhibit") == 0) { config->allow_shortcuts_inhibit = atoi(value); + } else if (strcmp(key, "transparent_wlr_lock") == 0) { + config->transparent_wlr_lock = atoi(value); } else if (strcmp(key, "no_border_when_single") == 0) { config->no_border_when_single = atoi(value); } else if (strcmp(key, "no_radius_when_single") == 0) { @@ -2671,6 +2674,7 @@ void override_config(void) { adaptive_sync = CLAMP_INT(config.adaptive_sync, 0, 1); allow_tearing = CLAMP_INT(config.allow_tearing, 0, 2); allow_shortcuts_inhibit = CLAMP_INT(config.allow_shortcuts_inhibit, 0, 1); + transparent_wlr_lock = CLAMP_INT(config.transparent_wlr_lock, 0, 1); axis_bind_apply_timeout = CLAMP_INT(config.axis_bind_apply_timeout, 0, 1000); focus_on_activate = CLAMP_INT(config.focus_on_activate, 0, 1); @@ -2849,6 +2853,7 @@ void set_value_default() { config.adaptive_sync = adaptive_sync; config.allow_tearing = allow_tearing; config.allow_shortcuts_inhibit = allow_shortcuts_inhibit; + config.transparent_wlr_lock = transparent_wlr_lock; config.no_border_when_single = no_border_when_single; config.no_radius_when_single = no_radius_when_single; config.snap_distance = snap_distance; diff --git a/src/config/preset.h b/src/config/preset.h index eaa7be2..da8100a 100644 --- a/src/config/preset.h +++ b/src/config/preset.h @@ -103,6 +103,7 @@ int warpcursor = 1; /* Warp cursor to focused client */ int xwayland_persistence = 1; /* xwayland persistence */ int syncobj_enable = 0; int adaptive_sync = 0; +int transparent_wlr_lock = 0; double drag_refresh_interval = 30.0; int allow_tearing = TEARING_DISABLED; int allow_shortcuts_inhibit = SHORTCUTS_INHIBIT_ENABLE; diff --git a/src/mango.c b/src/mango.c index 8a27b75..287e4a6 100644 --- a/src/mango.c +++ b/src/mango.c @@ -3029,7 +3029,9 @@ void destroylock(SessionLock *lock, int unlock) { if ((locked = !unlock)) goto destroy; - wlr_scene_node_set_enabled(&locked_bg->node, false); + if (locked_bg->node.enabled) { + wlr_scene_node_set_enabled(&locked_bg->node, false); + } focusclient(focustop(selmon), 0); motionnotify(0, NULL, 0, 0, 0, 0); @@ -3567,7 +3569,9 @@ void pending_kill_client(Client *c) { void locksession(struct wl_listener *listener, void *data) { struct wlr_session_lock_v1 *session_lock = data; SessionLock *lock; - wlr_scene_node_set_enabled(&locked_bg->node, true); + if (!transparent_wlr_lock) { + wlr_scene_node_set_enabled(&locked_bg->node, true); + } if (cur_lock) { wlr_session_lock_v1_destroy(session_lock); return; From 7c7a9437e67b120df24fd4aa0d6ab5a963bc934d Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 29 Nov 2025 16:31:09 +0800 Subject: [PATCH 5/8] opt: optimize option name transparent_wlr_lock to allow_lock_transparent --- src/config/parse_config.h | 10 +++++----- src/config/preset.h | 2 +- src/mango.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config/parse_config.h b/src/config/parse_config.h index b750c7c..7196270 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -339,7 +339,7 @@ typedef struct { int adaptive_sync; int allow_tearing; int allow_shortcuts_inhibit; - int transparent_wlr_lock; + int allow_lock_transparent; struct xkb_rule_names xkb_rules; @@ -1222,8 +1222,8 @@ void parse_option(Config *config, char *key, char *value) { config->allow_tearing = atoi(value); } else if (strcmp(key, "allow_shortcuts_inhibit") == 0) { config->allow_shortcuts_inhibit = atoi(value); - } else if (strcmp(key, "transparent_wlr_lock") == 0) { - config->transparent_wlr_lock = atoi(value); + } else if (strcmp(key, "allow_lock_transparent") == 0) { + config->allow_lock_transparent = atoi(value); } else if (strcmp(key, "no_border_when_single") == 0) { config->no_border_when_single = atoi(value); } else if (strcmp(key, "no_radius_when_single") == 0) { @@ -2674,7 +2674,7 @@ void override_config(void) { adaptive_sync = CLAMP_INT(config.adaptive_sync, 0, 1); allow_tearing = CLAMP_INT(config.allow_tearing, 0, 2); allow_shortcuts_inhibit = CLAMP_INT(config.allow_shortcuts_inhibit, 0, 1); - transparent_wlr_lock = CLAMP_INT(config.transparent_wlr_lock, 0, 1); + allow_lock_transparent = CLAMP_INT(config.allow_lock_transparent, 0, 1); axis_bind_apply_timeout = CLAMP_INT(config.axis_bind_apply_timeout, 0, 1000); focus_on_activate = CLAMP_INT(config.focus_on_activate, 0, 1); @@ -2853,7 +2853,7 @@ void set_value_default() { config.adaptive_sync = adaptive_sync; config.allow_tearing = allow_tearing; config.allow_shortcuts_inhibit = allow_shortcuts_inhibit; - config.transparent_wlr_lock = transparent_wlr_lock; + config.allow_lock_transparent = allow_lock_transparent; config.no_border_when_single = no_border_when_single; config.no_radius_when_single = no_radius_when_single; config.snap_distance = snap_distance; diff --git a/src/config/preset.h b/src/config/preset.h index da8100a..4032a75 100644 --- a/src/config/preset.h +++ b/src/config/preset.h @@ -103,7 +103,7 @@ int warpcursor = 1; /* Warp cursor to focused client */ int xwayland_persistence = 1; /* xwayland persistence */ int syncobj_enable = 0; int adaptive_sync = 0; -int transparent_wlr_lock = 0; +int allow_lock_transparent = 0; double drag_refresh_interval = 30.0; int allow_tearing = TEARING_DISABLED; int allow_shortcuts_inhibit = SHORTCUTS_INHIBIT_ENABLE; diff --git a/src/mango.c b/src/mango.c index ca8d8c9..ff9ed6e 100644 --- a/src/mango.c +++ b/src/mango.c @@ -3576,7 +3576,7 @@ void pending_kill_client(Client *c) { void locksession(struct wl_listener *listener, void *data) { struct wlr_session_lock_v1 *session_lock = data; SessionLock *lock; - if (!transparent_wlr_lock) { + if (!allow_lock_transparent) { wlr_scene_node_set_enabled(&locked_bg->node, true); } if (cur_lock) { From b3ccf43453491196be8a94c672394dcc527803a0 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 29 Nov 2025 17:30:01 +0800 Subject: [PATCH 6/8] opt: not swallow the isminied window --- src/mango.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mango.c b/src/mango.c index ff9ed6e..b80d3d8 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1376,7 +1376,7 @@ void applyrules(Client *c) { if (!c->noswallow && !c->isfloating && !client_is_float_type(c) && !c->surface.xdg->initial_commit) { Client *p = termforwin(c); - if (p) { + if (p && !p->isminied) { c->swallowedby = p; p->swallowing = c; wl_list_remove(&c->link); From 09c19205150f067fd524feafebbaa8744a3e0885 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 29 Nov 2025 17:33:57 +0800 Subject: [PATCH 7/8] opt: correct var isminized to isminimized --- src/dispatch/bind_define.h | 12 +++++----- src/ext-protocol/foreign-toplevel.h | 4 ++-- src/mango.c | 34 ++++++++++++++--------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index d79a7c6..a141830 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -133,7 +133,7 @@ int focuslast(const Arg *arg) { unsigned int target = 0; wl_list_for_each(c, &fstack, flink) { - if (c->iskilling || c->isminied || c->isunglobal || + if (c->iskilling || c->isminimized || c->isunglobal || !client_surface(c)->mapped || client_is_unmanaged(c) || client_is_x11_popup(c)) continue; @@ -471,7 +471,7 @@ int restore_minimized(const Arg *arg) { if (selmon && selmon->sel && selmon->sel->is_in_scratchpad && selmon->sel->is_scratchpad_show) { - selmon->sel->isminied = 0; + selmon->sel->isminimized = 0; selmon->sel->is_scratchpad_show = 0; selmon->sel->is_in_scratchpad = 0; selmon->sel->isnamedscratchpad = 0; @@ -480,7 +480,7 @@ int restore_minimized(const Arg *arg) { } wl_list_for_each(c, &clients, link) { - if (c->isminied && !c->isnamedscratchpad) { + if (c->isminimized && !c->isnamedscratchpad) { c->is_scratchpad_show = 0; c->is_in_scratchpad = 0; c->isnamedscratchpad = 0; @@ -1122,7 +1122,7 @@ int toggle_scratchpad(const Arg *arg) { continue; } - if (single_scratchpad && c->isnamedscratchpad && !c->isminied) { + if (single_scratchpad && c->isnamedscratchpad && !c->isminimized) { set_minimized(c); continue; } @@ -1447,7 +1447,7 @@ int minimized(const Arg *arg) { if (selmon && selmon->isoverview) return 0; - if (selmon->sel && !selmon->sel->isminied) { + if (selmon->sel && !selmon->sel->isminimized) { set_minimized(selmon->sel); } return 0; @@ -1469,7 +1469,7 @@ int toggleoverview(const Arg *arg) { wl_list_for_each(c, &clients, link) if (c && c->mon == selmon && !client_is_unmanaged(c) && !client_is_x11_popup(c) && - !c->isminied && + !c->isminimized && !c->isunglobal) { visible_client_number++; } diff --git a/src/ext-protocol/foreign-toplevel.h b/src/ext-protocol/foreign-toplevel.h index adfcd21..0bb649e 100644 --- a/src/ext-protocol/foreign-toplevel.h +++ b/src/ext-protocol/foreign-toplevel.h @@ -9,12 +9,12 @@ void handle_foreign_activate_request(struct wl_listener *listener, void *data) { if (c && c->swallowing) return; - if (c && !c->isminied && c == selmon->sel) { + if (c && !c->isminimized && c == selmon->sel) { set_minimized(c); return; } - if (c->isminied) { + if (c->isminimized) { c->is_in_scratchpad = 0; c->isnamedscratchpad = 0; c->is_scratchpad_show = 0; diff --git a/src/mango.c b/src/mango.c index b80d3d8..5c804a0 100644 --- a/src/mango.c +++ b/src/mango.c @@ -102,10 +102,10 @@ A->geom.x + A->geom.width <= A->mon->m.x + A->mon->m.width && \ A->geom.y + A->geom.height <= A->mon->m.y + A->mon->m.height) #define ISTILED(A) \ - (A && !(A)->isfloating && !(A)->isminied && !(A)->iskilling && \ + (A && !(A)->isfloating && !(A)->isminimized && !(A)->iskilling && \ !(A)->ismaximizescreen && !(A)->isfullscreen && !(A)->isunglobal) #define ISSCROLLTILED(A) \ - (A && !(A)->isfloating && !(A)->isminied && !(A)->iskilling && \ + (A && !(A)->isfloating && !(A)->isminimized && !(A)->iskilling && \ !(A)->isunglobal) #define VISIBLEON(C, M) \ ((C) && (M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags])) @@ -315,7 +315,7 @@ struct Client { unsigned int configure_serial; struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel; int isfloating, isurgent, isfullscreen, isfakefullscreen, - need_float_size_reduce, isminied, isoverlay, isnosizehint, + need_float_size_reduce, isminimized, isoverlay, isnosizehint, ignore_maximize, ignore_minimize; int ismaximizescreen; int overview_backup_bw; @@ -1009,7 +1009,7 @@ void swallow(Client *c, Client *w) { c->isurgent = w->isurgent; c->isfullscreen = w->isfullscreen; c->ismaximizescreen = w->ismaximizescreen; - c->isminied = w->isminied; + c->isminimized = w->isminimized; c->is_in_scratchpad = w->is_in_scratchpad; c->is_scratchpad_show = w->is_scratchpad_show; c->tags = w->tags; @@ -1029,7 +1029,7 @@ void swallow(Client *c, Client *w) { if (!c->foreign_toplevel && c->mon) add_foreign_toplevel(c); - if (c->isminied && c->foreign_toplevel) { + if (c->isminimized && c->foreign_toplevel) { wlr_foreign_toplevel_handle_v1_set_activated(c->foreign_toplevel, false); wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, true); @@ -1376,7 +1376,7 @@ void applyrules(Client *c) { if (!c->noswallow && !c->isfloating && !client_is_float_type(c) && !c->surface.xdg->initial_commit) { Client *p = termforwin(c); - if (p && !p->isminied) { + if (p && !p->isminimized) { c->swallowedby = p; p->swallowing = c; wl_list_remove(&c->link); @@ -3633,7 +3633,7 @@ void init_client_properties(Client *c) { c->iskilling = 0; c->istagswitching = 0; c->isglobal = 0; - c->isminied = 0; + c->isminimized = 0; c->isoverlay = 0; c->isunglobal = 0; c->is_in_scratchpad = 0; @@ -3803,7 +3803,7 @@ void maximizenotify(struct wl_listener *listener, void *data) { void unminimize(Client *c) { if (c && c->is_in_scratchpad && c->is_scratchpad_show) { - c->isminied = 0; + c->isminimized = 0; c->is_scratchpad_show = 0; c->is_in_scratchpad = 0; c->isnamedscratchpad = 0; @@ -3811,7 +3811,7 @@ void unminimize(Client *c) { return; } - if (c && c->isminied) { + if (c && c->isminimized) { show_hide_client(c); c->is_scratchpad_show = 0; c->is_in_scratchpad = 0; @@ -3831,7 +3831,7 @@ void set_minimized(Client *c) { c->oldtags = c->mon->tagset[c->mon->seltags]; c->mini_restore_tag = c->tags; c->tags = 0; - c->isminied = 1; + c->isminimized = 1; c->is_in_scratchpad = 1; c->is_scratchpad_show = 0; focusclient(focustop(selmon), 1); @@ -3846,15 +3846,15 @@ void minimizenotify(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, minimize); - if (!c || !c->mon || c->iskilling || c->isminied) + if (!c || !c->mon || c->iskilling || c->isminimized) return; if (client_request_minimize(c, data) && !c->ignore_minimize) { - if (!c->isminied) + if (!c->isminimized) set_minimized(c); client_set_minimized(c, true); } else { - if (c->isminied) + if (c->isminimized) unminimize(c); client_set_minimized(c, false); } @@ -4845,7 +4845,7 @@ void show_hide_client(Client *c) { c->tags = c->oldtags; arrange(c->mon, false); } - c->isminied = 0; + c->isminimized = 0; wlr_foreign_toplevel_handle_v1_set_minimized(c->foreign_toplevel, false); focusclient(c, 1); wlr_foreign_toplevel_handle_v1_set_activated(c->foreign_toplevel, true); @@ -5334,7 +5334,7 @@ void unmapnotify(struct wl_listener *listener, void *data) { Monitor *m = NULL; c->iskilling = 1; - if (animations && !c->is_clip_to_hide && !c->isminied && + if (animations && !c->is_clip_to_hide && !c->isminimized && (!c->mon || VISIBLEON(c, c->mon))) init_fadeout_client(c); @@ -5745,8 +5745,8 @@ void activatex11(struct wl_listener *listener, void *data) { if (c && c->swallowing) return; - if (c->isminied) { - c->isminied = 0; + if (c->isminimized) { + c->isminimized = 0; c->tags = c->mini_restore_tag; c->is_scratchpad_show = 0; c->is_in_scratchpad = 0; From c0eceeb3bf2c995c378472900fc18801a3ff35e0 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 29 Nov 2025 22:46:47 +0800 Subject: [PATCH 8/8] fix: avoid toggle overview when setfullscreen and setmaximziescreen --- src/mango.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/mango.c b/src/mango.c index 5c804a0..70b2218 100644 --- a/src/mango.c +++ b/src/mango.c @@ -102,10 +102,10 @@ A->geom.x + A->geom.width <= A->mon->m.x + A->mon->m.width && \ A->geom.y + A->geom.height <= A->mon->m.y + A->mon->m.height) #define ISTILED(A) \ - (A && !(A)->isfloating && !(A)->isminimized && !(A)->iskilling && \ + (A && !(A)->isfloating && !(A)->isminimized && !(A)->iskilling && \ !(A)->ismaximizescreen && !(A)->isfullscreen && !(A)->isunglobal) #define ISSCROLLTILED(A) \ - (A && !(A)->isfloating && !(A)->isminimized && !(A)->iskilling && \ + (A && !(A)->isfloating && !(A)->isminimized && !(A)->iskilling && \ !(A)->isunglobal) #define VISIBLEON(C, M) \ ((C) && (M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags])) @@ -4559,6 +4559,9 @@ void setmaximizescreen(Client *c, int maximizescreen) { if (!c || !c->mon || !client_surface(c)->mapped || c->iskilling) return; + if (c->mon->isoverview) + return; + c->ismaximizescreen = maximizescreen; if (maximizescreen) { @@ -4568,10 +4571,6 @@ void setmaximizescreen(Client *c, int maximizescreen) { if (c->isfloating) c->float_geom = c->geom; - if (selmon->isoverview) { - Arg arg = {0}; - toggleoverview(&arg); - } maximizescreen_box.x = c->mon->w.x + gappoh; maximizescreen_box.y = c->mon->w.y + gappov; @@ -4615,11 +4614,15 @@ void setfakefullscreen(Client *c, int fakefullscreen) { void setfullscreen(Client *c, int fullscreen) // 用自定义全屏代理自带全屏 { - c->isfullscreen = fullscreen; if (!c || !c->mon || !client_surface(c)->mapped || c->iskilling) return; + if (c->mon->isoverview) + return; + + c->isfullscreen = fullscreen; + client_set_fullscreen(c, fullscreen); if (fullscreen) { @@ -4628,10 +4631,6 @@ void setfullscreen(Client *c, int fullscreen) // 用自定义全屏代理自带 if (c->isfloating) c->float_geom = c->geom; - if (selmon->isoverview) { - Arg arg = {0}; - toggleoverview(&arg); - } c->bw = 0; wlr_scene_node_raise_to_top(&c->scene->node); // 将视图提升到顶层