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
=== modified file 'plugins/grid/src/grid.cpp'
--- plugins/grid/src/grid.cpp 2013-07-12 19:04:03 +0000
+++ plugins/grid/src/grid.cpp 2013-11-20 18:51:49 +0000
@@ -1011,20 +1011,17 @@
1011 {1011 {
1012 lastTarget = GridUnknown;1012 lastTarget = GridUnknown;
10131013
1014 if (!window->grabbed ())1014 if (isGridHorzMaximized)
1015 {1015 {
1016 if (isGridHorzMaximized)1016 window->saveMask () |= CWY | CWHeight;
1017 {1017 window->saveWc ().y = originalSize.y ();
1018 window->saveMask () |= CWY | CWHeight;1018 window->saveWc ().height = originalSize.height ();
1019 window->saveWc ().y = originalSize.y ();1019 }
1020 window->saveWc ().height = originalSize.height ();1020 else if (isGridVertMaximized)
1021 }1021 {
1022 else if (isGridVertMaximized)1022 window->saveMask () |= CWX | CWWidth;
1023 {1023 window->saveWc ().x = originalSize.x ();
1024 window->saveMask () |= CWX | CWWidth;1024 window->saveWc ().width = originalSize.width ();
1025 window->saveWc ().x = originalSize.x ();
1026 window->saveWc ().width = originalSize.width ();
1027 }
1028 }1025 }
10291026
1030 if ((isGridHorzMaximized &&1027 if ((isGridHorzMaximized &&

Subscribers

People subscribed via source and target branches