mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Fix mouse button grab swallowing
We grab Mod+Button events for our own purposes, and swallow them using XAllowEvents(AsyncPointer) to prevent the client window from seeing them. But if events are coming in fast enough (e.g. via fast wheel scrolling) so that multiple grabbed events are in the queue, the second queued event would be allowed to leak through to the client by the unconditional XAllowEvents(ReplayPointer) a few lines later.
This commit is contained in:
committed by
Carlos R. Mafra
parent
b575955263
commit
12d16d92e7
@@ -767,14 +767,14 @@ static void handleButtonPress(XEvent * event)
|
|||||||
|
|
||||||
if (event->xbutton.state & ( MOD_MASK | ControlMask )) {
|
if (event->xbutton.state & ( MOD_MASK | ControlMask )) {
|
||||||
XAllowEvents(dpy, AsyncPointer, CurrentTime);
|
XAllowEvents(dpy, AsyncPointer, CurrentTime);
|
||||||
}
|
} else {
|
||||||
|
|
||||||
/* if (wPreferences.focus_mode == WKF_CLICK) { */
|
/* if (wPreferences.focus_mode == WKF_CLICK) { */
|
||||||
if (wPreferences.ignore_focus_click) {
|
if (wPreferences.ignore_focus_click) {
|
||||||
XAllowEvents(dpy, AsyncPointer, CurrentTime);
|
XAllowEvents(dpy, AsyncPointer, CurrentTime);
|
||||||
}
|
}
|
||||||
XAllowEvents(dpy, ReplayPointer, CurrentTime);
|
XAllowEvents(dpy, ReplayPointer, CurrentTime);
|
||||||
/* } */
|
/* } */
|
||||||
|
}
|
||||||
XSync(dpy, 0);
|
XSync(dpy, 0);
|
||||||
} else if (desc->parent_type == WCLASS_APPICON
|
} else if (desc->parent_type == WCLASS_APPICON
|
||||||
|| desc->parent_type == WCLASS_MINIWINDOW || desc->parent_type == WCLASS_DOCK_ICON) {
|
|| desc->parent_type == WCLASS_MINIWINDOW || desc->parent_type == WCLASS_DOCK_ICON) {
|
||||||
|
|||||||
Reference in New Issue
Block a user