Merge lp:~smspillaz/unity/unity4.0_fix_881190 into lp:unity/4.0

Proposed by Sam Spilsbury
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1722
Proposed branch: lp:~smspillaz/unity/unity4.0_fix_881190
Merge into: lp:unity/4.0
Diff against target: 94 lines (+20/-8)
3 files modified
plugins/unityshell/src/comptransientfor.cpp (+4/-1)
plugins/unityshell/src/transientfor.cpp (+12/-4)
plugins/unityshell/src/unityshell.cpp (+4/-3)
To merge this branch: bzr merge lp:~smspillaz/unity/unity4.0_fix_881190
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+85886@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/comptransientfor.cpp'
--- plugins/unityshell/src/comptransientfor.cpp 2011-08-23 14:47:38 +0000
+++ plugins/unityshell/src/comptransientfor.cpp 2011-12-15 15:37:26 +0000
@@ -55,13 +55,16 @@
55bool55bool
56compiz::CompTransientForReader::isTransientFor (unsigned int ancestor)56compiz::CompTransientForReader::isTransientFor (unsigned int ancestor)
57{57{
58 if (!ancestor ||
59 !priv->mWindow->id ())
58 return priv->mWindow->transientFor () == ancestor;60 return priv->mWindow->transientFor () == ancestor;
59}61}
6062
61bool63bool
62compiz::CompTransientForReader::isGroupTransientFor (unsigned int clientLeader)64compiz::CompTransientForReader::isGroupTransientFor (unsigned int clientLeader)
63{65{
64 if (!clientLeader)66 if (!clientLeader ||
67 !priv->mWindow->id ())
65 return false;68 return false;
6669
67 if (priv->mWindow->transientFor () == None || priv->mWindow->transientFor () == screen->root ())70 if (priv->mWindow->transientFor () == None || priv->mWindow->transientFor () == screen->root ())
6871
=== modified file 'plugins/unityshell/src/transientfor.cpp'
--- plugins/unityshell/src/transientfor.cpp 2011-08-26 10:37:35 +0000
+++ plugins/unityshell/src/transientfor.cpp 2011-12-15 15:37:26 +0000
@@ -51,9 +51,9 @@
51 {51 {
52 if (actualType == XA_WINDOW && actualFormat == 32 && nLeft == 0 && nItems == 1)52 if (actualType == XA_WINDOW && actualFormat == 32 && nLeft == 0 && nItems == 1)
53 {53 {
54 Window *data = (Window *) prop;54 Window *data = (Window *) prop;
5555
56 serverAncestor = *data;56 serverAncestor = *data;
57 }57 }
5858
59 XFree (prop);59 XFree (prop);
@@ -65,6 +65,10 @@
65bool65bool
66compiz::X11TransientForReader::isTransientFor (unsigned int ancestor)66compiz::X11TransientForReader::isTransientFor (unsigned int ancestor)
67{67{
68 if (!ancestor ||
69 !priv->mXid)
70 return false;
71
68 return ancestor == getAncestor ();72 return ancestor == getAncestor ();
69}73}
7074
@@ -80,14 +84,18 @@
80 std::vector<std::string> strings;84 std::vector<std::string> strings;
81 std::list<Atom> atoms;85 std::list<Atom> atoms;
8286
87 if (!clientLeader ||
88 !priv->mXid)
89 return false;
90
83 if (XGetWindowProperty (priv->mDpy, priv->mXid, wmClientLeader, 0L, 2L, false,91 if (XGetWindowProperty (priv->mDpy, priv->mXid, wmClientLeader, 0L, 2L, false,
84 XA_WINDOW, &actualType, &actualFormat, &nItems, &nLeft, (unsigned char **)&prop) == Success)92 XA_WINDOW, &actualType, &actualFormat, &nItems, &nLeft, (unsigned char **)&prop) == Success)
85 {93 {
86 if (actualType == XA_WINDOW && actualFormat == 32 && nLeft == 0 && nItems == 1)94 if (actualType == XA_WINDOW && actualFormat == 32 && nLeft == 0 && nItems == 1)
87 {95 {
88 Window *data = (Window *) prop;96 Window *data = (Window *) prop;
8997
90 serverClientLeader = *data;98 serverClientLeader = *data;
91 }99 }
92100
93 XFree (prop);101 XFree (prop);
94102
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2011-10-17 16:47:52 +0000
+++ plugins/unityshell/src/unityshell.cpp 2011-12-15 15:37:26 +0000
@@ -2551,7 +2551,7 @@
25512551
2552 UnityShowdesktopHandler::animating_windows.remove (window);2552 UnityShowdesktopHandler::animating_windows.remove (window);
25532553
2554 if (mMinimizeHandler)2554 if (mMinimizeHandler && !window->destroyed ())
2555 {2555 {
2556 unminimize ();2556 unminimize ();
2557 window->focusSetEnabled (this, false);2557 window->focusSetEnabled (this, false);
@@ -2559,9 +2559,10 @@
2559 window->unminimizeSetEnabled (this, false);2559 window->unminimizeSetEnabled (this, false);
2560 window->minimizedSetEnabled (this, false);2560 window->minimizedSetEnabled (this, false);
2561 window->minimize ();2561 window->minimize ();
2562
2563 mMinimizeHandler.reset ();
2564 }2562 }
2563
2564 mMinimizeHandler.reset ();
2565
2565 if (mShowdesktopHandler)2566 if (mShowdesktopHandler)
2566 delete mShowdesktopHandler;2567 delete mShowdesktopHandler;
2567 2568

Subscribers

People subscribed via source and target branches

to all changes: