From e45a3bc07d6356f57329c214e3fb32b87ad77669 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Sat, 14 Feb 2026 10:11:34 -0500 Subject: [PATCH] wmaker: ignore mouse wheel when giving window focus This patch is fixing a window focus issue by ignoring mouse wheel up/down buttons. How to reproduce the issue: open 2 xterm with one window overlapping the other, in 1 xterm list files with ls to have the scrollbar to appear, click the other xterm to give focus to its window, now mouse wheel up or down on the other xterm, at that point the window is focused but under the other xterm. Try to click left button to get it to appear on top, it will not work cause the focus is set already on it. With that patch the click to focus is working. --- src/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index 80b38430..e56bb638 100644 --- a/src/window.c +++ b/src/window.c @@ -2978,7 +2978,7 @@ static void frameMouseDown(WObjDescriptor *desc, XEvent *event) CloseWindowMenu(wwin->screen_ptr); - if (!(event->xbutton.state & ControlMask) && !WFLAGP(wwin, no_focusable)) + if (event->xbutton.button != Button4 && event->xbutton.button != Button5 && !(event->xbutton.state & ControlMask) && !WFLAGP(wwin, no_focusable)) wSetFocusTo(wwin->screen_ptr, wwin); if (event->xbutton.button == Button1)