diff options
author | Darrell Anderson <[email protected]> | 2012-12-26 13:35:30 -0600 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2012-12-26 13:35:30 -0600 |
commit | 4d3d2420430fb53000ceda25ae7498e49f6e94b2 (patch) | |
tree | f350afc9cba3f615fa3c982b73e57b2272fa8a47 /twin/workspace.cpp | |
parent | f5c55ca4ce9587598ce81399c2196c876ec55942 (diff) | |
parent | 0ef12d60c85f58af9052d83ce1945d71afe16cb4 (diff) | |
download | tdebase-4d3d2420430fb53000ceda25ae7498e49f6e94b2.tar.gz tdebase-4d3d2420430fb53000ceda25ae7498e49f6e94b2.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdebase
Diffstat (limited to 'twin/workspace.cpp')
-rw-r--r-- | twin/workspace.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/twin/workspace.cpp b/twin/workspace.cpp index 643395e88..cc109918c 100644 --- a/twin/workspace.cpp +++ b/twin/workspace.cpp @@ -1974,6 +1974,37 @@ void Workspace::resumeWindowId( Window window_to_resume ) } +bool Workspace::isResumeableWindowID( Window window_to_check ) + { + if( window_to_check == None ) + return false; + Window window = window_to_check; + Client* client = NULL; + for(;;) + { + client = findClient( FrameIdMatchPredicate( window )); + if( client != NULL ) // found the client + break; + 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 ) + XFree( children ); + 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 ) + return client->isResumeable(); + else + return false; + } + + void Workspace::sendPingToWindow( Window window, Time timestamp ) { rootInfo->sendPing( window, timestamp ); |