From 849b480a5b25b6800011d120551a551b1d4477bd Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 22 Sep 2025 15:43:25 +0800 Subject: [PATCH] opt: disable some action in overview --- src/dispatch/bind_define.h | 11 +++++++++++ src/mango.c | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 98b1986..e3baaac 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -399,6 +399,10 @@ void resizewin(const Arg *arg) { void restore_minimized(const Arg *arg) { Client *c; + + if (selmon && selmon->isoverview) + return; + if (selmon && selmon->sel && selmon->sel->is_in_scratchpad && selmon->sel->is_scratchpad_show) { selmon->sel->isminied = 0; @@ -1038,6 +1042,10 @@ void toggle_scratchpad(const Arg *arg) { Client *c; bool hit = false; Client *tmp = NULL; + + if (selmon && selmon->isoverview) + return; + wl_list_for_each_safe(c, tmp, &clients, link) { if (c->mon != selmon) { continue; @@ -1066,6 +1074,9 @@ void togglefakefullscreen(const Arg *arg) { void togglefloating(const Arg *arg) { Client *sel = focustop(selmon); + if (selmon && selmon->isoverview) + return; + if (!sel) return; diff --git a/src/mango.c b/src/mango.c index 4fb5250..9366d45 100644 --- a/src/mango.c +++ b/src/mango.c @@ -903,6 +903,10 @@ void clear_fullscreen_flag(Client *c) { } void minimized(const Arg *arg) { + + if (selmon && selmon->isoverview) + return; + if (selmon->sel && !selmon->sel->isminied) { set_minimized(selmon->sel); }