Fix DCOP interface to window suspend/resume functions

This resolves Bug 1354
pull/2/head
Timothy Pearson 12 years ago
parent 786e248cea
commit 57b56bb3f7

@ -12,9 +12,9 @@ class KWinInterface : virtual public DCOPObject
virtual ASYNC cascadeDesktop() = 0; virtual ASYNC cascadeDesktop() = 0;
virtual ASYNC unclutterDesktop() = 0; virtual ASYNC unclutterDesktop() = 0;
virtual ASYNC reconfigure() = 0; virtual ASYNC reconfigure() = 0;
virtual ASYNC killWindow() = 0; virtual ASYNC killWindowId(unsigned long winId) = 0;
virtual ASYNC suspendWindow() = 0; virtual ASYNC suspendWindowId(unsigned long winId) = 0;
virtual ASYNC resumeWindow() = 0; virtual ASYNC resumeWindowId(unsigned long winId) = 0;
virtual void refresh() = 0; virtual void refresh() = 0;
virtual void doNotManage(TQString)= 0; virtual void doNotManage(TQString)= 0;
virtual void showWindowMenuAt(unsigned long winId, int x, int y)= 0; virtual void showWindowMenuAt(unsigned long winId, int x, int y)= 0;

@ -1894,8 +1894,9 @@ void Workspace::killWindowId( Window window_to_kill )
client = findClient( FrameIdMatchPredicate( window )); client = findClient( FrameIdMatchPredicate( window ));
if( client != NULL ) // found the client if( client != NULL ) // found the client
break; break;
Window parent, root; Window parent = NULL;
Window* children; Window root = NULL;
Window* children = NULL;
unsigned int children_count; unsigned int children_count;
XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count );
if( children != NULL ) if( children != NULL )
@ -1903,6 +1904,8 @@ void Workspace::killWindowId( Window window_to_kill )
if( window == root ) // we didn't find the client, probably an override-redirect window if( window == root ) // we didn't find the client, probably an override-redirect window
break; break;
window = parent; // go up window = parent; // go up
if( window == NULL )
break;
} }
if( client != NULL ) if( client != NULL )
client->killWindow(); client->killWindow();
@ -1921,8 +1924,9 @@ void Workspace::suspendWindowId( Window window_to_suspend )
client = findClient( FrameIdMatchPredicate( window )); client = findClient( FrameIdMatchPredicate( window ));
if( client != NULL ) // found the client if( client != NULL ) // found the client
break; break;
Window parent, root; Window parent = NULL;
Window* children; Window root = NULL;
Window* children = NULL;
unsigned int children_count; unsigned int children_count;
XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count );
if( children != NULL ) if( children != NULL )
@ -1930,6 +1934,8 @@ void Workspace::suspendWindowId( Window window_to_suspend )
if( window == root ) // we didn't find the client, probably an override-redirect window if( window == root ) // we didn't find the client, probably an override-redirect window
break; break;
window = parent; // go up window = parent; // go up
if( window == NULL )
break;
} }
if( client != NULL ) if( client != NULL )
client->suspendWindow(); client->suspendWindow();
@ -1948,8 +1954,9 @@ void Workspace::resumeWindowId( Window window_to_resume )
client = findClient( FrameIdMatchPredicate( window )); client = findClient( FrameIdMatchPredicate( window ));
if( client != NULL ) // found the client if( client != NULL ) // found the client
break; break;
Window parent, root; Window parent = NULL;
Window* children; Window root = NULL;
Window* children = NULL;
unsigned int children_count; unsigned int children_count;
XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count );
if( children != NULL ) if( children != NULL )
@ -1957,6 +1964,8 @@ void Workspace::resumeWindowId( Window window_to_resume )
if( window == root ) // we didn't find the client, probably an override-redirect window if( window == root ) // we didn't find the client, probably an override-redirect window
break; break;
window = parent; // go up window = parent; // go up
if( window == NULL )
break;
} }
if( client != NULL ) if( client != NULL )
client->resumeWindow(); client->resumeWindow();

Loading…
Cancel
Save