diff options
author | Timothy Pearson <[email protected]> | 2012-12-03 14:52:50 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-12-03 14:52:50 -0600 |
commit | 57b56bb3f70096f08aef681d9ed42ea11ba9630b (patch) | |
tree | 31e5ee779b74cf4b110aeff26d49d85b93df795c /twin/workspace.cpp | |
parent | 786e248cea658856ef647b7ab8d3e8cf7c057918 (diff) | |
download | tdebase-57b56bb3f70096f08aef681d9ed42ea11ba9630b.tar.gz tdebase-57b56bb3f70096f08aef681d9ed42ea11ba9630b.zip |
Fix DCOP interface to window suspend/resume functions
This resolves Bug 1354
Diffstat (limited to 'twin/workspace.cpp')
-rw-r--r-- | twin/workspace.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/twin/workspace.cpp b/twin/workspace.cpp index 6781e912e..923e8775a 100644 --- a/twin/workspace.cpp +++ b/twin/workspace.cpp @@ -1894,8 +1894,9 @@ void Workspace::killWindowId( Window window_to_kill ) client = findClient( FrameIdMatchPredicate( window )); if( client != NULL ) // found the client break; - Window parent, root; - Window* children; + Window parent = NULL; + Window root = NULL; + Window* children = NULL; unsigned int children_count; XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); 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 break; window = parent; // go up + if( window == NULL ) + break; } if( client != NULL ) client->killWindow(); @@ -1921,8 +1924,9 @@ void Workspace::suspendWindowId( Window window_to_suspend ) client = findClient( FrameIdMatchPredicate( window )); if( client != NULL ) // found the client break; - Window parent, root; - Window* children; + Window parent = NULL; + Window root = NULL; + Window* children = NULL; unsigned int children_count; XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); 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 break; window = parent; // go up + if( window == NULL ) + break; } if( client != NULL ) client->suspendWindow(); @@ -1948,8 +1954,9 @@ void Workspace::resumeWindowId( Window window_to_resume ) client = findClient( FrameIdMatchPredicate( window )); if( client != NULL ) // found the client break; - Window parent, root; - Window* children; + Window parent = NULL; + Window root = NULL; + Window* children = NULL; unsigned int children_count; XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); 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 break; window = parent; // go up + if( window == NULL ) + break; } if( client != NULL ) client->resumeWindow(); |