Merge lp:~compiz-team/compiz-grid-plugin/oneiric.fix_862339 into lp:~compiz-team/compiz-grid-plugin/oneiric

Proposed by Sam Spilsbury
Status: Merged
Merge reported by: Sam Spilsbury
Merged at revision: not available
Proposed branch: lp:~compiz-team/compiz-grid-plugin/oneiric.fix_862339
Merge into: lp:~compiz-team/compiz-grid-plugin/oneiric
Diff against target: 85 lines (+16/-9)
1 file modified
src/grid.cpp (+16/-9)
To merge this branch: bzr merge lp:~compiz-team/compiz-grid-plugin/oneiric.fix_862339
Reviewer Review Type Date Requested Status
Compiz Maintainers Pending
Review via email: mp+77517@code.launchpad.net

This proposal supersedes a proposal from 2011-09-29.

Description of the change

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/grid.cpp'
2--- src/grid.cpp 2011-09-29 11:18:56 +0000
3+++ src/grid.cpp 2011-09-29 12:45:44 +0000
4@@ -345,6 +345,7 @@
5 {
6 /* First restore the window to its original size */
7 XWindowChanges rwc;
8+ CompWindowExtents lb = gw->lastBorder;
9
10 rwc.x = gw->originalSize.x ();
11 rwc.y = gw->originalSize.y ();
12@@ -358,18 +359,26 @@
13
14 gw->lastBorder = cw->border ();
15 /* Maximize the window */
16- printf ("maximizing window\n");
17 cw->maximize (CompWindowStateMaximizedVertMask);
18+
19+ /* Adjust for any updated border extents */
20+ xwc.x -= lb.left - cw->border ().left;
21+ xwc.y -= lb.top - cw->border ().top;
22+ xwc.width += (lb.left - cw->border ().left) + (lb.right - cw->border ().right);
23+ xwc.height += (lb.top - cw->border ().top) + (lb.bottom - cw->border ().bottom);
24+
25+ /* Make window the size that we want */
26+ cw->configureXWindow (valueMask, &xwc);
27 }
28 else
29 {
30 gw->isGridResized = true;
31 gw->isGridMaximized = false;
32+
33+ /* Make window the size that we want */
34+ cw->configureXWindow (valueMask, &xwc);
35 }
36
37- /* Make window the size that we want */
38- cw->configureXWindow (valueMask, &xwc);
39-
40 for (unsigned int i = 0; i < animations.size (); i++)
41 animations.at (i).fadingOut = true;
42 }
43@@ -787,8 +796,6 @@
44 dx = currentSize.x () - window->geometry ().x ();
45 dy = currentSize.y () - window->geometry ().y ();
46
47- printf ("offset move\n");
48-
49 window->move (dx, dy);
50 }
51 }
52@@ -818,7 +825,7 @@
53 {
54 if (n == CompWindowNotifyFrameUpdate)
55 {
56- if (isGridMaximized && !((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE))
57+ if (isGridMaximized && (window->state () & MAXIMIZE_STATE))
58 {
59 unsigned int valueMask = 0;
60 XWindowChanges xwc;
61@@ -833,6 +840,7 @@
62 valueMask |= CWWidth;
63 if (dh != 0)
64 valueMask |= CWHeight;
65+
66 xwc.width = window->serverGeometry ().width () + dw;
67 xwc.height = window->serverGeometry ().height () + dh;
68
69@@ -878,7 +886,6 @@
70 xwc.height = gw->originalSize.height ();
71 cw->maximize (0);
72 gw->currentSize = CompRect ();
73- printf ("attempting snapBack\n");
74 cw->configureXWindow (CWX | CWY | CWWidth | CWHeight, &xwc);
75 gw->pointerBufDx = 0;
76 gw->pointerBufDy = 0;
77@@ -1046,7 +1053,7 @@
78 pointerBufDx (0),
79 pointerBufDy (0),
80 resizeCount (0),
81- lastTarget (GridUnknown)
82+ lastTarget (GridWindowType::GridUnknown)
83 {
84 WindowInterface::setHandler (window);
85 }

Subscribers

People subscribed via source and target branches

to all changes: