summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2010-05-02 14:57:10 +0200
committerDanny Baumann <dannybaumann@web.de>2010-05-02 14:57:10 +0200
commit5eff4e176ed3c12493311ab2edd60bf9c58a4dc7 (patch)
tree084b7753a3bd085cfbc0c0f907a68b5f77d94146 /src/window.cpp
parentddef9e0a5f0dba12916152b19a250d49b34637ce (diff)
downloadunity-window-decorator-5eff4e176ed3c12493311ab2edd60bf9c58a4dc7.tar.gz
unity-window-decorator-5eff4e176ed3c12493311ab2edd60bf9c58a4dc7.tar.bz2
Optionally traverse through ancestry when getting the client leader of a
window which has no own client leader set.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 6072f96..3854feb 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -4770,9 +4770,15 @@ CompWindow::desktop ()
}
Window
-CompWindow::clientLeader ()
+CompWindow::clientLeader (bool checkAncestor)
{
- return priv->clientLeader;
+ if (priv->clientLeader)
+ return priv->clientLeader;
+
+ if (checkAncestor)
+ return priv->getClientLeaderOfAncestor ();
+
+ return None;
}
Window