[PATCH] wmaker: ignore mouse wheel when giving window focus

2 views
Skip to first unread message

david.m...@gmail.com

unread,
Feb 14, 2026, 10:23:17 AM (10 days ago) Feb 14
to Window Maker Development
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)
--
2.43.0
0001-wmaker-ignore-mouse-wheel-when-giving-window-focus.patch
Reply all
Reply to author
Forward
0 new messages