From 62dcc1120fdcd632e83cccc57e39e3e5959ecc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 29 May 2003 12:16:27 +0000 Subject: [PATCH] I'm honestly not sure why that XAllowEvents() is needed for mouse events to work, when only keyboard is grabbed with GrabModeAsync for pointer, but it fixed #59059, and it shouldn't break anything. svn path=/trunk/kdebase/kwin/; revision=228598 --- workspace.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index d758c638de..fb25756419 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -574,14 +574,11 @@ bool Workspace::workspaceEvent( XEvent * e ) } - Client * c = findClient( e->xany.window ); - if ( c ) - return c->windowEvent( e ); - switch (e->type) { case ButtonPress: if ( tab_grab || control_grab ) { XUngrabKeyboard(qt_xdisplay(), qt_x_time); + XAllowEvents( qt_xdisplay(), AsyncPointer, qt_x_time ); tab_box->hide(); keys->setEnabled( true ); tab_grab = control_grab = false; @@ -589,7 +586,18 @@ bool Workspace::workspaceEvent( XEvent * e ) } case ButtonRelease: case MotionNotify: + if ( tab_grab || control_grab ) { + XAllowEvents( qt_xdisplay(), AsyncPointer, qt_x_time ); + return TRUE; + } break; + }; + + Client * c = findClient( e->xany.window ); + if ( c ) + return c->windowEvent( e ); + + switch (e->type) { case CreateNotify: if ( e->xcreatewindow.parent == root &&