fix: overview cursor jump miss apply when no mousebind

This commit is contained in:
DreamMaoMao 2026-06-15 00:00:03 +08:00
parent 15fb37f1c6
commit 83adb33ad2

View file

@ -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 ||