diff --git a/client.cpp b/client.cpp index 194e15236b..436f4bee8c 100644 --- a/client.cpp +++ b/client.cpp @@ -501,7 +501,7 @@ bool Client::unmapNotify( XUnmapEvent& e ) withdraw(); break; case NormalState: - if ( !mapped && !e.send_event ) + if ( ( !mapped || !windowWrapper()->isVisibleTo( this )) && !e.send_event ) return TRUE; // this event was produced by us as well // maybe we will be destroyed soon. Check this first. @@ -771,7 +771,7 @@ void Client::mouseMoveEvent( QMouseEvent * e) shaded = FALSE; } - QPoint globalPos = e->pos() + geometry().topLeft(); + QPoint globalPos = e->globalPos(); // pos() + geometry().topLeft(); QPoint p = globalPos + invertedMoveOffset; diff --git a/workspace.cpp b/workspace.cpp index a16185af72..3eb4f5060a 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -666,19 +666,19 @@ void Workspace::grabKey(KeySym keysym, unsigned int mod){ } XGrabKey(qt_xdisplay(), XKeysymToKeycode(qt_xdisplay(), keysym), mod, - qt_xrootwin(), TRUE, + qt_xrootwin(), FALSE, GrabModeSync, GrabModeSync); XGrabKey(qt_xdisplay(), XKeysymToKeycode(qt_xdisplay(), keysym), mod | LockMask, - qt_xrootwin(), TRUE, + qt_xrootwin(), FALSE, GrabModeSync, GrabModeSync); XGrabKey(qt_xdisplay(), XKeysymToKeycode(qt_xdisplay(), keysym), mod | NumLockMask, - qt_xrootwin(), TRUE, + qt_xrootwin(), FALSE, GrabModeSync, GrabModeSync); XGrabKey(qt_xdisplay(), XKeysymToKeycode(qt_xdisplay(), keysym), mod | LockMask | NumLockMask, - qt_xrootwin(), TRUE, + qt_xrootwin(), FALSE, GrabModeSync, GrabModeSync); }