Merge lp:~compiz-team/compiz-core/compiz-core.fix_860397 into lp:compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2844
Proposed branch: lp:~compiz-team/compiz-core/compiz-core.fix_860397
Merge into: lp:compiz-core/0.9.5
Diff against target: 177 lines (+77/-7)
1 file modified
src/window.cpp (+77/-7)
To merge this branch: bzr merge lp:~compiz-team/compiz-core/compiz-core.fix_860397
Reviewer Review Type Date Requested Status
Robert Carr (community) Approve
Review via email: mp+77158@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Robert Carr (robertcarr) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/window.cpp'
2--- src/window.cpp 2011-09-25 04:16:18 +0000
3+++ src/window.cpp 2011-09-27 12:16:25 +0000
4@@ -2490,6 +2490,7 @@
5 bool aboveFs)
6 {
7 CompWindow *below;
8+ CompWindow *t = screen->findWindow (w->transientFor ());
9 Window clientLeader = w->priv->clientLeader;
10 unsigned int type = w->priv->type;
11 unsigned int belowMask;
12@@ -2504,6 +2505,15 @@
13 (w->priv->state & CompWindowStateBelowMask))
14 type = CompWindowTypeNormalMask;
15
16+ while (t && type != CompWindowTypeDockMask)
17+ {
18+ /* dock stacking of transients for docks */
19+ if (t->type () & CompWindowTypeDockMask)
20+ type = CompWindowTypeDockMask;
21+
22+ t = screen->findWindow (t->transientFor ());
23+ }
24+
25 if (w->priv->transientFor || w->priv->isGroupTransient (clientLeader))
26 clientLeader = None;
27
28@@ -2539,14 +2549,28 @@
29 }
30 break;
31 default:
32+ {
33+ bool allowedRelativeToLayer = !(below->priv->type & belowMask);
34+
35+ t = screen->findWindow (below->transientFor ());
36+
37+ while (t && allowedRelativeToLayer)
38+ {
39+ /* dock stacking of transients for docks */
40+ allowedRelativeToLayer = !(t->priv->type & belowMask);
41+
42+ t = screen->findWindow (t->transientFor ());
43+ }
44+
45 /* fullscreen and normal layer */
46- if (!(below->priv->type & belowMask))
47+ if (allowedRelativeToLayer)
48 {
49 if (stackLayerCheck (w, clientLeader, below))
50 return below;
51 }
52 break;
53 }
54+ }
55 }
56
57 return NULL;
58@@ -2558,6 +2582,7 @@
59 PrivateWindow::findLowestSiblingBelow (CompWindow *w)
60 {
61 CompWindow *below, *lowest = screen->serverWindows ().back ();
62+ CompWindow *t = screen->findWindow (w->transientFor ());
63 Window clientLeader = w->priv->clientLeader;
64 unsigned int type = w->priv->type;
65
66@@ -2566,6 +2591,16 @@
67 (w->priv->state & CompWindowStateBelowMask))
68 type = CompWindowTypeNormalMask;
69
70+ while (t && type != CompWindowTypeDockMask)
71+ {
72+ /* dock stacking of transients for docks */
73+ if (t->type () & CompWindowTypeDockMask)
74+ type = CompWindowTypeDockMask;
75+
76+ t = screen->findWindow (t->transientFor ());
77+ }
78+
79+
80 if (w->priv->transientFor || w->priv->isGroupTransient (clientLeader))
81 clientLeader = None;
82
83@@ -2600,14 +2635,28 @@
84 }
85 break;
86 default:
87+ {
88+ bool allowedRelativeToLayer = !(below->priv->type & CompWindowTypeDockMask);
89+
90+ t = screen->findWindow (below->transientFor ());
91+
92+ while (t && allowedRelativeToLayer)
93+ {
94+ /* dock stacking of transients for docks */
95+ allowedRelativeToLayer = !(t->priv->type & CompWindowTypeDockMask);
96+
97+ t = screen->findWindow (t->transientFor ());
98+ }
99+
100 /* fullscreen and normal layer */
101- if (!(below->priv->type & CompWindowTypeDockMask))
102+ if (allowedRelativeToLayer)
103 {
104 if (!stackLayerCheck (below, clientLeader, w))
105 return lowest;
106 }
107 break;
108 }
109+ }
110
111 lowest = below;
112 }
113@@ -2619,6 +2668,7 @@
114 PrivateWindow::validSiblingBelow (CompWindow *w,
115 CompWindow *sibling)
116 {
117+ CompWindow *t = screen->findWindow (w->transientFor ());
118 Window clientLeader = w->priv->clientLeader;
119 unsigned int type = w->priv->type;
120
121@@ -2627,6 +2677,16 @@
122 (w->priv->state & CompWindowStateBelowMask))
123 type = CompWindowTypeNormalMask;
124
125+ while (t && type != CompWindowTypeDockMask)
126+ {
127+ /* dock stacking of transients for docks */
128+ if (t->type () & CompWindowTypeDockMask)
129+ type = CompWindowTypeDockMask;
130+
131+ t = screen->findWindow (t->transientFor ());
132+ }
133+
134+
135 if (w->priv->transientFor || w->priv->isGroupTransient (clientLeader))
136 clientLeader = None;
137
138@@ -2656,14 +2716,28 @@
139 }
140 break;
141 default:
142+ {
143+ bool allowedRelativeToLayer = !(sibling->priv->type & CompWindowTypeDockMask);
144+
145+ t = screen->findWindow (sibling->transientFor ());
146+
147+ while (t && allowedRelativeToLayer)
148+ {
149+ /* dock stacking of transients for docks */
150+ allowedRelativeToLayer = !(t->priv->type & CompWindowTypeDockMask);
151+
152+ t = screen->findWindow (t->transientFor ());
153+ }
154+
155 /* fullscreen and normal layer */
156- if (!(sibling->priv->type & CompWindowTypeDockMask))
157+ if (allowedRelativeToLayer)
158 {
159 if (stackLayerCheck (w, clientLeader, sibling))
160 return true;
161 }
162 break;
163 }
164+ }
165
166 return false;
167 }
168@@ -2895,10 +2969,6 @@
169 if (t->priv->transientFor == w->priv->id ||
170 t->priv->isGroupTransient (clientLeader))
171 {
172- if (w->priv->type & CompWindowTypeDockMask)
173- if (!(t->priv->type & CompWindowTypeDockMask))
174- return false;
175-
176 if (!stackTransients (t, avoid, xwc, updateList))
177 return false;
178

Subscribers

People subscribed via source and target branches