Merge lp:~townsend/compiz/fix-lp1244754-0.9.10 into lp:compiz/0.9.10

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3799
Merged at revision: 3799
Proposed branch: lp:~townsend/compiz/fix-lp1244754-0.9.10
Merge into: lp:compiz/0.9.10
Diff against target: 35 lines (+11/-14)
1 file modified
plugins/grid/src/grid.cpp (+11/-14)
To merge this branch: bzr merge lp:~townsend/compiz/fix-lp1244754-0.9.10
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+195999@code.launchpad.net

Commit message

When saving window geometry when going into maximized/semi-maximized, also save for grabbed windows as well. This fixes a desktop hang condition. This is a backport from lp:compiz revno. 3803.

Description of the change

= Issue =
A reasonable corner case where a window that is snapped to the panel and the bottom of screen that is then dragged to the left or right to vertically semi-maximize it and then dragged to the top will cause the desktop to hang.

= Fix =
A check to only save window geometry when a window was not grabbed needed to be removed. It should save this regardless if the window is grabbed or not when the state changes from a maximized state to non-maximized.

= Test =
1. Open a window.
2. Snap it to the top panel and bottom of the screen.
3. Drag the window to the left or right to semi-maximize it.
4. Drag the window to the top to maximize it.

This should cause the desktop hang. This fix should allow the window to become maximized.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/grid/src/grid.cpp'
2--- plugins/grid/src/grid.cpp 2013-07-12 19:04:03 +0000
3+++ plugins/grid/src/grid.cpp 2013-11-20 18:51:49 +0000
4@@ -1011,20 +1011,17 @@
5 {
6 lastTarget = GridUnknown;
7
8- if (!window->grabbed ())
9- {
10- if (isGridHorzMaximized)
11- {
12- window->saveMask () |= CWY | CWHeight;
13- window->saveWc ().y = originalSize.y ();
14- window->saveWc ().height = originalSize.height ();
15- }
16- else if (isGridVertMaximized)
17- {
18- window->saveMask () |= CWX | CWWidth;
19- window->saveWc ().x = originalSize.x ();
20- window->saveWc ().width = originalSize.width ();
21- }
22+ if (isGridHorzMaximized)
23+ {
24+ window->saveMask () |= CWY | CWHeight;
25+ window->saveWc ().y = originalSize.y ();
26+ window->saveWc ().height = originalSize.height ();
27+ }
28+ else if (isGridVertMaximized)
29+ {
30+ window->saveMask () |= CWX | CWWidth;
31+ window->saveWc ().x = originalSize.x ();
32+ window->saveWc ().width = originalSize.width ();
33 }
34
35 if ((isGridHorzMaximized &&

Subscribers

People subscribed via source and target branches