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

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

Description of the change

Use findSiblingBelow to determine if the window can be raised further, since otherwise we could incorrectly match the window as capable of being raised above a window it is not allowed to be raised above and we would continue to grab Button1 on the frame which would break some applications

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-20 14:43:43 +0000
3+++ src/window.cpp 2011-09-20 15:50:49 +0000
4@@ -5226,16 +5226,14 @@
5 {
6 if (screen->priv->optionGetRaiseOnClick ())
7 {
8- for (CompWindow *above = window->next;
9- above != NULL; above = above->next)
10+ CompWindow *highestSibling =
11+ PrivateWindow::findSiblingBelow (window, true);
12+
13+ /* Check if this window is permitted to be raised */
14+ for (CompWindow *above = window->serverNext;
15+ above != NULL; above = above->serverNext)
16 {
17- if (above->priv->attrib.map_state != IsViewable)
18- continue;
19-
20- if (above->type () & CompWindowTypeDockMask)
21- continue;
22-
23- if (above->region ().intersects (region))
24+ if (highestSibling == above)
25 {
26 onlyActions = false;
27 break;
28@@ -5263,7 +5261,7 @@
29 XGrabButton (screen->priv->dpy,
30 bind.button,
31 mods | ignore,
32- frame,
33+ serverFrame,
34 false,
35 ButtonPressMask | ButtonReleaseMask |
36 ButtonMotionMask,
37@@ -5280,7 +5278,7 @@
38 XGrabButton (screen->priv->dpy,
39 AnyButton,
40 AnyModifier,
41- frame, false,
42+ serverFrame, false,
43 ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
44 GrabModeSync,
45 GrabModeAsync,

Subscribers

People subscribed via source and target branches