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

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2848
Proposed branch: lp:~compiz-team/compiz-core/compiz-core.fix_716521
Merge into: lp:compiz-core/0.9.5
Diff against target: 35 lines (+18/-0)
1 file modified
plugins/decor/src/decor.cpp (+18/-0)
To merge this branch: bzr merge lp:~compiz-team/compiz-core/compiz-core.fix_716521
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+77321@code.launchpad.net

Description of the change

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/decor/src/decor.cpp'
2--- plugins/decor/src/decor.cpp 2011-09-27 11:54:45 +0000
3+++ plugins/decor/src/decor.cpp 2011-09-28 12:38:13 +0000
4@@ -2772,6 +2772,10 @@
5 {
6 if (wd && wd->decor)
7 {
8+ int oldShiftX = shiftX ();
9+ int oldShiftY = shiftY ();
10+ int moveDx, moveDy;
11+
12 if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
13 window->setWindowFrameExtents (&wd->decor->maxBorder,
14 &wd->decor->maxInput);
15@@ -2779,6 +2783,20 @@
16 window->setWindowFrameExtents (&wd->decor->border,
17 &wd->decor->input);
18
19+ /* Since we immediately update the frame extents, we must
20+ * also update the stored saved window geometry in order
21+ * to prevent the window from shifting back too far once
22+ * unmaximized */
23+
24+ moveDx = shiftX () - oldShiftX;
25+ moveDy = shiftY () - oldShiftY;
26+
27+ if (window->saveMask () & CWX)
28+ window->saveWc ().x += moveDx;
29+
30+ if (window->saveMask () & CWY)
31+ window->saveWc ().y += moveDy;
32+
33 updateFrame ();
34 }
35 }

Subscribers

People subscribed via source and target branches