Merge lp:~vanvugt/compiz-core/fix-946388 into lp:compiz-core

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 3095
Proposed branch: lp:~vanvugt/compiz-core/fix-946388
Merge into: lp:compiz-core
Diff against target: 43 lines (+13/-10)
1 file modified
src/window.cpp (+13/-10)
To merge this branch: bzr merge lp:~vanvugt/compiz-core/fix-946388
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Sam Spilsbury Approve
Review via email: mp+102487@code.launchpad.net

Description of the change

Don't refuse to fullscreen windows that have the same dimensions as the
screen itself (LP: #946388)

It seems that fitting a semi-maximized window is quite different to fitting
a fullscreen window, because a fullscreen window does not have borders.

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

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 2012-04-16 09:44:13 +0000
3+++ src/window.cpp 2012-04-18 10:35:26 +0000
4@@ -641,26 +641,29 @@
5 * the screen */
6 bool foundVert = false;
7 bool foundHorz = false;
8+ bool foundFull = false;
9
10 foreach (CompOutput &o, screen->outputDevs ())
11 {
12- if (o.width () > (priv->sizeHints.min_width + priv->border.left + priv->border.right))
13+ if (o.width () >= (priv->sizeHints.min_width + priv->border.left + priv->border.right))
14 foundHorz = true;
15- if (o.height () > (priv->sizeHints.min_height + priv->border.top + priv->border.bottom))
16+ if (o.height () >= (priv->sizeHints.min_height + priv->border.top + priv->border.bottom))
17 foundVert = true;
18+
19+ /* Fullscreen windows don't need to fit borders... */
20+ if (o.width () >= priv->sizeHints.min_width &&
21+ o.height () >= priv->sizeHints.min_height)
22+ foundFull = true;
23 }
24
25 if (!foundHorz)
26- {
27- actions &= ~(CompWindowActionMaximizeHorzMask |
28- CompWindowActionFullscreenMask);
29- }
30+ actions &= ~CompWindowActionMaximizeHorzMask;
31
32 if (!foundVert)
33- {
34- actions &= ~(CompWindowActionMaximizeVertMask |
35- CompWindowActionFullscreenMask);
36- }
37+ actions &= ~CompWindowActionMaximizeVertMask;
38+
39+ if (!foundFull)
40+ actions &= ~CompWindowActionFullscreenMask;
41
42 if (!(priv->mwmFunc & MwmFuncAll))
43 {

Subscribers

People subscribed via source and target branches