1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-19 09:13:33 +01:00

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.
This commit is contained in:
David Maciejak
2026-02-14 10:11:34 -05:00
committed by Carlos R. Mafra
parent bc16a03722
commit e45a3bc07d

View File

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