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
1=== modified file 'plugins/unityshell/src/comptransientfor.cpp'
2--- plugins/unityshell/src/comptransientfor.cpp 2011-08-23 14:47:38 +0000
3+++ plugins/unityshell/src/comptransientfor.cpp 2011-12-15 15:37:26 +0000
4@@ -55,13 +55,16 @@
5 bool
6 compiz::CompTransientForReader::isTransientFor (unsigned int ancestor)
7 {
8+ if (!ancestor ||
9+ !priv->mWindow->id ())
10 return priv->mWindow->transientFor () == ancestor;
11 }
12
13 bool
14 compiz::CompTransientForReader::isGroupTransientFor (unsigned int clientLeader)
15 {
16- if (!clientLeader)
17+ if (!clientLeader ||
18+ !priv->mWindow->id ())
19 return false;
20
21 if (priv->mWindow->transientFor () == None || priv->mWindow->transientFor () == screen->root ())
22
23=== modified file 'plugins/unityshell/src/transientfor.cpp'
24--- plugins/unityshell/src/transientfor.cpp 2011-08-26 10:37:35 +0000
25+++ plugins/unityshell/src/transientfor.cpp 2011-12-15 15:37:26 +0000
26@@ -51,9 +51,9 @@
27 {
28 if (actualType == XA_WINDOW && actualFormat == 32 && nLeft == 0 && nItems == 1)
29 {
30- Window *data = (Window *) prop;
31+ Window *data = (Window *) prop;
32
33- serverAncestor = *data;
34+ serverAncestor = *data;
35 }
36
37 XFree (prop);
38@@ -65,6 +65,10 @@
39 bool
40 compiz::X11TransientForReader::isTransientFor (unsigned int ancestor)
41 {
42+ if (!ancestor ||
43+ !priv->mXid)
44+ return false;
45+
46 return ancestor == getAncestor ();
47 }
48
49@@ -80,14 +84,18 @@
50 std::vector<std::string> strings;
51 std::list<Atom> atoms;
52
53+ if (!clientLeader ||
54+ !priv->mXid)
55+ return false;
56+
57 if (XGetWindowProperty (priv->mDpy, priv->mXid, wmClientLeader, 0L, 2L, false,
58 XA_WINDOW, &actualType, &actualFormat, &nItems, &nLeft, (unsigned char **)&prop) == Success)
59 {
60 if (actualType == XA_WINDOW && actualFormat == 32 && nLeft == 0 && nItems == 1)
61 {
62- Window *data = (Window *) prop;
63+ Window *data = (Window *) prop;
64
65- serverClientLeader = *data;
66+ serverClientLeader = *data;
67 }
68
69 XFree (prop);
70
71=== modified file 'plugins/unityshell/src/unityshell.cpp'
72--- plugins/unityshell/src/unityshell.cpp 2011-10-17 16:47:52 +0000
73+++ plugins/unityshell/src/unityshell.cpp 2011-12-15 15:37:26 +0000
74@@ -2551,7 +2551,7 @@
75
76 UnityShowdesktopHandler::animating_windows.remove (window);
77
78- if (mMinimizeHandler)
79+ if (mMinimizeHandler && !window->destroyed ())
80 {
81 unminimize ();
82 window->focusSetEnabled (this, false);
83@@ -2559,9 +2559,10 @@
84 window->unminimizeSetEnabled (this, false);
85 window->minimizedSetEnabled (this, false);
86 window->minimize ();
87-
88- mMinimizeHandler.reset ();
89 }
90+
91+ mMinimizeHandler.reset ();
92+
93 if (mShowdesktopHandler)
94 delete mShowdesktopHandler;
95

Subscribers

People subscribed via source and target branches

to all changes: