From 83adb33ad2c8532c291a1a8fc75a2004b7e4690c Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 15 Jun 2026 00:00:03 +0800 Subject: [PATCH] fix: overview cursor jump miss apply when no mousebind --- src/mango.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/mango.c b/src/mango.c index 1e39ddb5..1fad3011 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2338,6 +2338,17 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) { } } + // overview模式下鼠标左键跳转,右键关闭窗口 + if (selmon && selmon->isoverview && event->button == BTN_LEFT && c) { + toggleoverview(&(Arg){.i = 1}); + return true; + } + + if (selmon && selmon->isoverview && event->button == BTN_RIGHT && c) { + pending_kill_client(c); + return true; + } + // 当鼠标焦点在layer上的时候,不检测虚拟键盘的mod状态, // 避免layer虚拟键盘锁死mod按键状态 hard_keyboard = &kb_group->wlr_group->keyboard; @@ -2354,16 +2365,6 @@ bool handle_buttonpress(struct wlr_pointer_button_event *event) { break; m = &config.mouse_bindings[ji]; - if (selmon->isoverview && event->button == BTN_LEFT && c) { - toggleoverview(&(Arg){.i = 1}); - return true; - } - - if (selmon->isoverview && event->button == BTN_RIGHT && c) { - pending_kill_client(c); - return true; - } - if (CLEANMASK(mods) == CLEANMASK(m->mod) && event->button == m->button && m->func && (CLEANMASK(m->mod) != 0 ||