Merge lp:~hikiko/compiz/compiz.scale-bottomYoffset into lp:compiz/0.9.12

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 4014
Merged at revision: 4021
Proposed branch: lp:~hikiko/compiz/compiz.scale-bottomYoffset
Merge into: lp:compiz/0.9.12
Diff against target: 82 lines (+18/-3)
5 files modified
plugins/expo/expo.xml.in (+6/-0)
plugins/expo/src/expo.cpp (+2/-0)
plugins/scale/include/scale/scale.h (+1/-1)
plugins/scale/scale.xml.in (+7/-1)
plugins/scale/src/scale.cpp (+2/-1)
To merge this branch: bzr merge lp:~hikiko/compiz/compiz.scale-bottomYoffset
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+293123@code.launchpad.net

Commit message

Expo, Scale: add support for bottom offsets

1- added an extra parameter to the scale plugin: YBottomOffset, which is the workArea distance from the bottom of the screen.
2- added YBottomOffset to the expo plugin.

Description of the change

added an extra parameter to the scale plugin: YBottomOffset, which is the workArea distance from the bottom of the screen.

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
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
4014. By Eleni Maria Stea

fixed the bottom workArea offset in multi-monitor

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) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/expo/expo.xml.in'
2--- plugins/expo/expo.xml.in 2015-10-26 17:15:43 +0000
3+++ plugins/expo/expo.xml.in 2016-05-16 11:30:05 +0000
4@@ -149,6 +149,12 @@
5 <_long>Vertical offset (in pixels).</_long>
6 <default>24</default>
7 </option>
8+ <option name="y_bottom_offset" type="int">
9+ <_short>Y Bottom Offset</_short>
10+ <_long>Vertical offset from the bottom (in pixels).</_long>
11+ <default>0</default>
12+ <min>0</min>
13+ </option>
14 <option name="distance" type="float">
15 <_short>Camera Distance</_short>
16 <_long>The distance between the camera and the exposed viewports.</_long>
17
18=== modified file 'plugins/expo/src/expo.cpp'
19--- plugins/expo/src/expo.cpp 2015-10-20 15:12:34 +0000
20+++ plugins/expo/src/expo.cpp 2016-05-16 11:30:05 +0000
21@@ -921,6 +921,8 @@
22 /* translate expo to center */
23 sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,
24 vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);
25+
26+ worldScaleFactorY -= (float)optionGetYBottomOffset () / (float)output->height ();
27 sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);
28
29
30
31=== modified file 'plugins/scale/include/scale/scale.h'
32--- plugins/scale/include/scale/scale.h 2014-04-15 16:47:09 +0000
33+++ plugins/scale/include/scale/scale.h 2016-05-16 11:30:05 +0000
34@@ -137,7 +137,7 @@
35 public:
36 ScaleWindow (CompWindow *w);
37 ~ScaleWindow ();
38-
39+
40 CompWindow *window;
41
42 bool hasSlot () const;
43
44=== modified file 'plugins/scale/scale.xml.in'
45--- plugins/scale/scale.xml.in 2015-10-26 17:15:43 +0000
46+++ plugins/scale/scale.xml.in 2016-05-16 11:30:05 +0000
47@@ -33,7 +33,13 @@
48 </option>
49 <option name="y_offset" type="int">
50 <_short>Y Offset</_short>
51- <_long>Vertical offset (in pixels).</_long>
52+ <_long>Vertical offset from the top (in pixels).</_long>
53+ <min>0</min>
54+ <default>0</default>
55+ </option>
56+ <option name="y_bottom_offset" type="int">
57+ <_short>Y Bottom Offset</_short>
58+ <_long>Vertical offset from the bottom (in pixels).</_long>)
59 <min>0</min>
60 <default>0</default>
61 </option>
62
63=== modified file 'plugins/scale/src/scale.cpp'
64--- plugins/scale/src/scale.cpp 2015-11-16 12:14:14 +0000
65+++ plugins/scale/src/scale.cpp 2016-05-16 11:30:05 +0000
66@@ -509,7 +509,7 @@
67 int nSlots = 0;
68
69 y = optionGetYOffset() + workArea.y () + spacing;
70- height = (workArea.height () - optionGetYOffset() - (lines + 1) * spacing) / lines;
71+ height = (workArea.height () - optionGetYOffset () - optionGetYBottomOffset () - (lines + 1) * spacing) / lines;
72
73 for (int i = 0; i < lines; i++)
74 {
75@@ -1752,6 +1752,7 @@
76 CompRect workArea (screen->currentOutputDev ().workArea ());
77 workArea.setX (workArea.x() + optionGetXOffset ());
78 workArea.setY (workArea.y() + optionGetYOffset ());
79+ workArea.setBottom (workArea.bottom () + optionGetYBottomOffset ());
80
81 if (workArea.contains (pointer))
82 {

Subscribers

People subscribed via source and target branches