Merge lp:~3v1n0/compiz/extents-resize-fixes into lp:compiz/0.9.11

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 3831
Merged at revision: 3833
Proposed branch: lp:~3v1n0/compiz/extents-resize-fixes
Merge into: lp:compiz/0.9.11
Diff against target: 46 lines (+10/-2)
2 files modified
src/privatewindow.h (+1/-0)
src/window.cpp (+9/-2)
To merge this branch: bzr merge lp:~3v1n0/compiz/extents-resize-fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+207333@code.launchpad.net

Commit message

Window: define proper cases when we need to resize a window when decorating/undecorating

Yeah, again here... So, now when setting the window extents, we resize a window only in these cases:
1) We have a normal window that has never been decorated (lp:1282304)
2) We're (re)decorating a maximized or fullscreen window (lp:1282305)

This seems to work well in all the cases I tested, with no regressions with nedit
(that highlighted an issue with old code path)

Description of the change

So, it seems we need to avoid resizing a window when decorating/undecorating it in some cases, while it's needed when creating a new normal window, or it might be go under the bottom edge of the screen.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/privatewindow.h'
--- src/privatewindow.h 2014-01-13 15:52:59 +0000
+++ src/privatewindow.h 2014-02-20 01:14:41 +0000
@@ -401,6 +401,7 @@
401 bool shaded;401 bool shaded;
402 bool hidden;402 bool hidden;
403 bool grabbed;403 bool grabbed;
404 bool alreadyDecorated;
404405
405 unsigned int desktop;406 unsigned int desktop;
406407
407408
=== modified file 'src/window.cpp'
--- src/window.cpp 2014-01-17 12:20:34 +0000
+++ src/window.cpp 2014-02-20 01:14:41 +0000
@@ -6341,6 +6341,7 @@
6341 shaded (false),6341 shaded (false),
6342 hidden (false),6342 hidden (false),
6343 grabbed (false),6343 grabbed (false),
6344 alreadyDecorated (false),
63446345
6345 desktop (0),6346 desktop (0),
63466347
@@ -6588,14 +6589,20 @@
6588 CompSize sizeDelta;6589 CompSize sizeDelta;
65896590
6590 /* We don't want to change the size of the window in general, but this is6591 /* We don't want to change the size of the window in general, but this is
6591 * needed in case that the window is maximized, so that it will extend6592 * needed in case that a normal windows has just been decorated or if
6593 * the window was maximized or fullscreen, so that it will extend
6592 * to use the whole available space. */6594 * to use the whole available space. */
6593 if ((state() & MAXIMIZE_STATE) == MAXIMIZE_STATE)6595
6596 if (((priv->type & CompWindowTypeNormalMask) && !priv->alreadyDecorated) ||
6597 (priv->state & MAXIMIZE_STATE) == MAXIMIZE_STATE ||
6598 (priv->state & CompWindowStateFullscreenMask) ||
6599 (priv->type & CompWindowTypeFullscreenMask))
6594 {6600 {
6595 sizeDelta.setWidth (-((b->left + b->right) -6601 sizeDelta.setWidth (-((b->left + b->right) -
6596 (priv->border.left + priv->border.right)));6602 (priv->border.left + priv->border.right)));
6597 sizeDelta.setHeight (-((b->top + b->bottom) -6603 sizeDelta.setHeight (-((b->top + b->bottom) -
6598 (priv->border.top + priv->border.bottom)));6604 (priv->border.top + priv->border.bottom)));
6605 priv->alreadyDecorated = true;
6599 }6606 }
66006607
6601 priv->serverInput = *i;6608 priv->serverInput = *i;

Subscribers

People subscribed via source and target branches