Merge lp:~townsend/compiz/fix-expo-maximized-window-gap into lp:compiz/0.9.11

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3862
Merged at revision: 3868
Proposed branch: lp:~townsend/compiz/fix-expo-maximized-window-gap
Merge into: lp:compiz/0.9.11
Diff against target: 54 lines (+27/-1)
1 file modified
plugins/expo/src/expo.cpp (+27/-1)
To merge this branch: bzr merge lp:~townsend/compiz/fix-expo-maximized-window-gap
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+220936@code.launchpad.net

Commit message

Fixes issue in the Expo plugin where a gap is shown in the place where the Launcher and Panel should be when windows are maximized. This was originally removed in rev. 3481.

Description of the change

Fixes issue in the Expo plugin where a gap is shown in the place where the Launcher and Panel should be when windows are maximized. This was originally removed in rev. 3481.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
Revision history for this message
Christopher Townsend (townsend) :
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
3862. By Christopher Townsend

Only check if the window is fully maximized when stretching it out to account for the Launcher and Panel.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/expo/src/expo.cpp'
2--- plugins/expo/src/expo.cpp 2013-07-14 10:38:09 +0000
3+++ plugins/expo/src/expo.cpp 2014-06-05 13:18:27 +0000
4@@ -1461,6 +1461,9 @@
5 const CompRegion &region,
6 unsigned int mask)
7 {
8+ GLMatrix wTransform (transform);
9+ GLWindowPaintAttrib wAttrib (attrib);
10+
11 if (eScreen->expoActive)
12 {
13 if (eScreen->expoCam > 0.0)
14@@ -1471,6 +1474,8 @@
15 ExpoScreen::ExpoAnimationZoom;
16 bool hide = eScreen->optionGetHideDocks () &&
17 (window->wmType () & CompWindowTypeDockMask);
18+ CompPoint vp;
19+ screen->viewportForGeometry (window->geometry (), vp);
20
21 if (!zoomAnim)
22 opacity = attrib.opacity * eScreen->expoCam;
23@@ -1486,9 +1491,30 @@
24
25 if (opacity <= 0)
26 mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
27+
28+ /* Stretch maximized windows a little so that you don't
29+ * have an awkward gap */
30+ if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
31+ {
32+ CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())];
33+ float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
34+ float xS = 1.0 + ((o->width () / (float) window->width ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
35+ wTransform.translate (window->x () + window->width (),
36+ window->y () + window->height (),
37+ 0.0f);
38+ wTransform.scale (xS, yS, 1.0f);
39+ wTransform.translate (-(window->x () + window->width ()),
40+ -(window->y () + window->height ()),
41+ 0.0f);
42+
43+ if (eScreen->paintingVp != vp)
44+ mask |= PAINT_WINDOW_NO_CORE_INSTANCE_MASK;
45+
46+ mask |= PAINT_WINDOW_TRANSFORMED_MASK;
47+ }
48 }
49
50- return gWindow->glPaint (attrib, transform, region, mask);
51+ return gWindow->glPaint (wAttrib, wTransform, region, mask);
52 }
53
54 bool

Subscribers

People subscribed via source and target branches