summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2010-02-09 15:06:36 +0100
committerDennis Kasprzyk <onestone@compiz-fusion.org>2010-02-09 15:06:36 +0100
commit1fec37dda515c2d097a4a86f99fdfe814540034a (patch)
treefb900ad2bcb64d171238af48216c19ee254afa87 /src/window.cpp
parentfb94b801e2d6e4a9b408ee8ba59d54529861a273 (diff)
downloadunity-window-decorator-1fec37dda515c2d097a4a86f99fdfe814540034a.tar.gz
unity-window-decorator-1fec37dda515c2d097a4a86f99fdfe814540034a.tar.bz2
Don't break initial stacking order.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 7f1018a..57749cf 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -4814,12 +4814,20 @@ PrivateWindow::updateMwmHints ()
void
PrivateWindow::updateStartupId ()
{
- if (startupId)
- free (startupId);
+ char *oldId = startupId;
+ bool newId = true;
startupId = getStartupId ();
- if (managed && startupId)
+ if (oldId)
+ {
+ if (strcmp (startupId, oldId) == 0)
+ newId = false;
+
+ free (oldId);
+ }
+
+ if (managed && startupId && newId)
{
Time timestamp = 0;
CompPoint vp, svp;
@@ -4948,8 +4956,7 @@ CompWindow::CompWindow (Window id,
priv->updateTransientHint ();
priv->clientLeader = priv->getClientLeader ();
- if (!priv->clientLeader)
- priv->startupId = priv->getStartupId ();
+ priv->startupId = priv->getStartupId ();
recalcType ();