Merge lp:~3v1n0/compiz/maximized-window-decor-adjust into lp:compiz/0.9.11

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Christopher Townsend
Approved revision: 3815
Merged at revision: 3816
Proposed branch: lp:~3v1n0/compiz/maximized-window-decor-adjust
Merge into: lp:compiz/0.9.11
Diff against target: 33 lines (+15/-2)
1 file modified
src/window.cpp (+15/-2)
To merge this branch: bzr merge lp:~3v1n0/compiz/maximized-window-decor-adjust
Reviewer Review Type Date Requested Status
Christopher Townsend (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+202084@code.launchpad.net

Commit message

Window: resize a maximized window if the decorations changed, so that it will fill all the available space

Description of the change

Set back the "resize hack" on extents changes for maximized windows.
In case they get decorated/undecorated, they need to resize in order
to fill the available space.

To post a comment you must log in.
3815. By Marco Trevisan (Treviño)

Window: resize a maximized window if the decorations changed, so that it will fill all the available space

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) 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 2014-01-13 15:52:59 +0000
3+++ src/window.cpp 2014-01-17 12:25:36 +0000
4@@ -6585,6 +6585,19 @@
5 compiz::window::extents::shift (priv->border,
6 priv->sizeHints.win_gravity);
7
8+ CompSize sizeDelta;
9+
10+ /* We don't want to change the size of the window in general, but this is
11+ * needed in case that the window is maximized, so that it will extend
12+ * to use the whole available space. */
13+ if ((state() & MAXIMIZE_STATE) == MAXIMIZE_STATE)
14+ {
15+ sizeDelta.setWidth (-((b->left + b->right) -
16+ (priv->border.left + priv->border.right)));
17+ sizeDelta.setHeight (-((b->top + b->bottom) -
18+ (priv->border.top + priv->border.bottom)));
19+ }
20+
21 priv->serverInput = *i;
22 priv->border = *b;
23
24@@ -6593,8 +6606,8 @@
25
26 xwc.x = movement.x () + priv->serverGeometry.x ();
27 xwc.y = movement.y () + priv->serverGeometry.y ();
28- xwc.width = priv->serverGeometry.width ();
29- xwc.height = priv->serverGeometry.height ();
30+ xwc.width = sizeDelta.width () + priv->serverGeometry.width ();
31+ xwc.height = sizeDelta.height () + priv->serverGeometry.height ();
32
33 configureXWindow (CWX | CWY | CWWidth | CWHeight, &xwc);
34

Subscribers

People subscribed via source and target branches