Merge lp:~hikiko/compiz/compiz.fix-expo-gap-bug into lp:compiz

Proposed by Eleni Maria Stea on 2016-08-26
Status: Work in progress
Proposed branch: lp:~hikiko/compiz/compiz.fix-expo-gap-bug
Merge into: lp:compiz
Diff against target: 44 lines (+13/-9)
2 files modified
plugins/expo/src/expo.cpp (+12/-8)
plugins/expo/src/wall_offset/src/wall-offset.cpp (+1/-1)
To merge this branch: bzr merge lp:~hikiko/compiz/compiz.fix-expo-gap-bug
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2016-08-26 Needs Information on 2016-11-03
Review via email: mp+304076@code.launchpad.net

Commit Message

Related bug: https://bugs.launchpad.net/compiz/+bug/1611464 Expo plugin shows a gap when a window is maximised on the left (when the launcher is on the left) or at the bottom (when the launcher is at the bottom).

Change: Fixed the maximised window translations to take the offsets into account. Also fixed the progressive and wrong scaling of the maximised windows.

Description of the Change

Related bug: https://bugs.launchpad.net/compiz/+bug/1611464 Expo plugin shows a gap when a window is maximised on the left (when the launcher is on the left) or at the bottom (when the launcher is at the bottom).

Change: Fixed the maximised window translations to take the offsets into account. Also fixed the progressive and wrong scaling of the maximised windows.

To post a comment you must log in.
Marco Trevisan (Treviño) (3v1n0) wrote :

Things have improved on the bottom side...

There's a top issue though, the window top side should not be stretched up to the maximum, but it should respect the workarea x+height value.

See what I mean: https://vid.me/lTHe

Marco Trevisan (Treviño) (3v1n0) wrote :

I've tried again this, but it's still broken... Please give this a new look.

review: Needs Information

Unmerged revisions

4087. By Eleni Maria Stea on 2016-09-22

removed debugging printf

4086. By Eleni Maria Stea on 2016-09-22

fixed the gap on the top

4085. By Eleni Maria Stea on 2016-08-26

fixed maximized window gap transformations

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 2016-08-18 09:39:05 +0000
3+++ plugins/expo/src/expo.cpp 2016-09-22 10:46:25 +0000
4@@ -1519,15 +1519,19 @@
5 (eScreen->dndWindow != window))
6 {
7 CompOutput *o = &screen->outputDevs ()[screen->outputDeviceForGeometry(window->geometry())];
8- float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
9- float xS = 1.0 + ((o->width () / (float) window->width ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
10- wTransform.translate (window->x () + window->width (),
11- window->y () + window->height () + eScreen->optionGetYBottomOffset (),
12- 0.0f);
13+ float xOffs = eScreen->optionGetXOffset ();
14+ float yOffs = eScreen->optionGetYOffset ();
15+ float yBottomOffs = eScreen->optionGetYBottomOffset ();
16+
17+ float xS = o->width () / (o->width () - xOffs);
18+ float yS = o->height () / (o->height () - yOffs - yBottomOffs);
19+
20+ float tx = window->x () - xOffs;
21+ float ty = window->y () - yOffs;
22+
23+ wTransform.translate (tx, ty, 0.0f);
24 wTransform.scale (xS, yS, 1.0f);
25- wTransform.translate (-(window->x () + window->width ()),
26- -(window->y () + window->height ()),
27- 0.0f);
28+ wTransform.translate (-window->x (), -window->y () + yOffs, 0.0f);
29 }
30 }
31
32
33=== modified file 'plugins/expo/src/wall_offset/src/wall-offset.cpp'
34--- plugins/expo/src/wall_offset/src/wall-offset.cpp 2013-08-21 20:12:13 +0000
35+++ plugins/expo/src/wall_offset/src/wall-offset.cpp 2016-09-22 10:46:25 +0000
36@@ -32,7 +32,7 @@
37 float &worldScaleFactorY,
38 float animationProgress)
39 {
40- const float sx = screenSize.width () / static_cast <float> (output.width ());
41+ const float sx = screenSize.width () / static_cast <float> (output.width ());
42 const float sy = screenSize.height () / static_cast <float> (output.height ());
43 offsetInWorldX = 0.0;
44 offsetInWorldY = 0.0;

Subscribers

People subscribed via source and target branches