But now there's a race condition - use a server grab to atomatically
check if the window still exists and selecting for events on it. svn path=/branches/work/kwin_composite/; revision=620295
This commit is contained in:
parent
2cbf4bb1c2
commit
9f48b9dd02
1 changed files with 8 additions and 0 deletions
|
@ -31,10 +31,17 @@ Unmanaged::~Unmanaged()
|
|||
bool Unmanaged::track( Window w )
|
||||
{
|
||||
XWindowAttributes attr;
|
||||
grabXServer();
|
||||
if( !XGetWindowAttributes(display(), w, &attr))
|
||||
{
|
||||
ungrabXServer();
|
||||
return false;
|
||||
}
|
||||
if( attr.c_class == InputOnly )
|
||||
{
|
||||
ungrabXServer();
|
||||
return false;
|
||||
}
|
||||
setHandle( w );
|
||||
XSelectInput( display(), w, StructureNotifyMask );
|
||||
geom = QRect( attr.x, attr.y, attr.width, attr.height );
|
||||
|
@ -54,6 +61,7 @@ bool Unmanaged::track( Window w )
|
|||
XShapeSelectInput( display(), w, ShapeNotifyMask );
|
||||
detectShape( w );
|
||||
setupCompositing();
|
||||
ungrabXServer();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue