parent
827740d489
commit
4c9d70a011
1 changed files with 11 additions and 0 deletions
11
client.cpp
11
client.cpp
|
@ -2227,6 +2227,17 @@ bool Client::x11Event( XEvent * e)
|
|||
setCursor( arrowCursor );
|
||||
}
|
||||
bool lostMouse = !rect().contains( QPoint( e->xcrossing.x, e->xcrossing.y ) );
|
||||
// 'lostMouse' wouldn't work with e.g. B2 or Keramik, which have non-rectangular decorations
|
||||
// (i.e. the LeaveNotify event comes before leaving the rect and no LeaveNotify event
|
||||
// comes after leaving the rect) - so lets check if the pointer is really outside the window
|
||||
if ( !lostMouse && e->xcrossing.detail != NotifyInferior ) {
|
||||
int d1, d2, d3, d4;
|
||||
unsigned int d5;
|
||||
Window w, child;
|
||||
if( XQueryPointer( qt_xdisplay(), winId(), &w, &child, &d1, &d2, &d3, &d4, &d5 ) == False
|
||||
|| child == None )
|
||||
lostMouse = true; // really lost the mouse
|
||||
}
|
||||
if ( lostMouse ) {
|
||||
delete autoRaiseTimer;
|
||||
autoRaiseTimer = 0;
|
||||
|
|
Loading…
Reference in a new issue