Merge lp:~unity-team/compiz-core/compiz-core.fix_800592 into lp:compiz-core/trunk

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2755
Proposed branch: lp:~unity-team/compiz-core/compiz-core.fix_800592
Merge into: lp:compiz-core/trunk
Diff against target: 141 lines (+22/-18)
5 files modified
gtk/window-decorator/metacity.c (+0/-6)
plugins/move/src/move.cpp (+5/-1)
plugins/resize/src/resize.cpp (+5/-1)
src/event.cpp (+0/-6)
src/window.cpp (+12/-4)
To merge this branch: bzr merge lp:~unity-team/compiz-core/compiz-core.fix_800592
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+65614@code.launchpad.net

Description of the change

Fixes some stacking issues: LP#800592 . There was a typo in PrivateWindow::stackDocks which would allow docks to be stacked relative to unmapped or override redirect windows

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/window-decorator/metacity.c'
2--- gtk/window-decorator/metacity.c 2011-05-07 08:58:10 +0000
3+++ gtk/window-decorator/metacity.c 2011-06-23 03:29:24 +0000
4@@ -658,11 +658,9 @@
5
6 if (d->frame_window)
7 {
8- int depth;
9 GdkColormap *cmap;
10
11 cmap = get_colormap_for_drawable (GDK_DRAWABLE (d->pixmap));
12- depth = gdk_drawable_get_depth (GDK_DRAWABLE (d->frame_window));
13 pixmap = create_pixmap (rect.width, size, d->frame->style_window_rgb);
14 gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), cmap);
15 }
16@@ -774,11 +772,9 @@
17
18 if (d->frame_window)
19 {
20- int depth;
21 GdkColormap *cmap;
22
23 cmap = get_colormap_for_drawable (GDK_DRAWABLE (d->pixmap));
24- depth = gdk_drawable_get_depth (GDK_DRAWABLE (d->frame_window));
25 pixmap = create_pixmap (size, rect.height, d->frame->style_window_rgb);
26 gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), cmap);
27 }
28@@ -1224,12 +1220,10 @@
29 MetaFrameGeometry fgeom;
30 MetaFrameFlags flags;
31 MetaTheme *theme;
32- WnckWindowType win_type;
33 GdkRectangle clip;
34
35 theme = meta_theme_get_current ();
36
37- win_type = wnck_window_get_window_type (d->win);
38 meta_get_decoration_geometry (d, theme, &flags, &fgeom, &button_layout,
39 meta_frame_type_from_string (d->frame->type),
40 &clip);
41
42=== modified file 'plugins/move/src/move.cpp'
43--- plugins/move/src/move.cpp 2011-03-14 16:12:45 +0000
44+++ plugins/move/src/move.cpp 2011-06-23 03:29:24 +0000
45@@ -127,7 +127,11 @@
46
47 w->grabNotify (x, y, mods, grabMask);
48
49- if (screen->getOption ("raise_on_click")->value ().b ())
50+ /* Click raise happens implicitly on buttons 1, 2 and 3 so don't
51+ * restack this window again if the action buttonbinding was from
52+ * one of those buttons */
53+ if (screen->getOption ("raise_on_click")->value ().b () &&
54+ button != Button1 && button != Button2 && button != Button3)
55 w->updateAttributes (CompStackingUpdateModeAboveFullscreen);
56
57 if (state & CompAction::StateInitKey)
58
59=== modified file 'plugins/resize/src/resize.cpp'
60--- plugins/resize/src/resize.cpp 2011-05-01 20:59:20 +0000
61+++ plugins/resize/src/resize.cpp 2011-06-23 03:29:24 +0000
62@@ -450,7 +450,11 @@
63
64 w->grabNotify (x, y, state, grabMask);
65
66- if (screen->getOption ("raise_on_click")->value ().b ())
67+ /* Click raise happens implicitly on buttons 1, 2 and 3 so don't
68+ * restack this window again if the action buttonbinding was from
69+ * one of those buttons */
70+ if (screen->getOption ("raise_on_click")->value ().b () &&
71+ button != Button1 && button != Button2 && button != Button3)
72 w->updateAttributes (CompStackingUpdateModeAboveFullscreen);
73
74 /* using the paint rectangle is enough here
75
76=== modified file 'src/event.cpp'
77--- src/event.cpp 2011-06-18 01:12:12 +0000
78+++ src/event.cpp 2011-06-23 03:29:24 +0000
79@@ -1203,12 +1203,6 @@
80 }
81 else if (!(event->xreparent.parent == priv->root))
82 {
83- bool remove = false;
84- Window xid = event->xreparent.window;
85- Window root_return;
86- unsigned int ui;
87- int x, y;
88-
89 /* This is the only case where a window is removed but not
90 destroyed. We must remove our event mask and all passive
91 grabs. */
92
93=== modified file 'src/window.cpp'
94--- src/window.cpp 2011-06-18 01:12:12 +0000
95+++ src/window.cpp 2011-06-23 03:29:24 +0000
96@@ -2542,25 +2542,32 @@
97 /* fullscreen window found */
98 if (firstFullscreenWindow)
99 {
100+ /* If there is another toplevel window above the fullscreen one
101+ * then we need to stack above that */
102 if (dw->focus () &&
103 !PrivateWindow::isAncestorTo (w, dw) &&
104 !(dw->type () & (CompWindowTypeFullscreenMask |
105 CompWindowTypeDockMask)) &&
106 !dw->overrideRedirect () &&
107- dw->defaultViewport () == screen->vp ())
108+ dw->defaultViewport () == screen->vp () &&
109+ dw->isViewable ())
110 {
111 belowDocks = dw;
112 }
113 }
114 else if (dw->type () & CompWindowTypeFullscreenMask)
115 {
116+ /* First fullscreen window found when checking up the stack
117+ * now go back down to find a suitable candidate client
118+ * window to put the docks above */
119 firstFullscreenWindow = dw;
120 for (CompWindow *dww = dw->prev; dww; dww = dww->prev)
121 {
122 if (!(dww->type () & (CompWindowTypeFullscreenMask |
123- CompWindowTypeDockMask) &&
124+ CompWindowTypeDockMask)) &&
125 !dww->overrideRedirect () &&
126- dww->defaultViewport () == screen->vp ()))
127+ dww->defaultViewport () == screen->vp () &&
128+ dww->isViewable ())
129 {
130 belowDocks = dww;
131 break;
132@@ -3428,7 +3435,8 @@
133 {
134 /* put active or soon-to-be-active fullscreen windows over
135 all others in their layer */
136- if (priv->id == screen->activeWindow ())
137+ if (priv->id == screen->activeWindow () ||
138+ priv->id == screen->priv->nextActiveWindow)
139 {
140 aboveFs = true;
141 }

Subscribers

People subscribed via source and target branches

to all changes: