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
=== modified file 'plugins/expo/expo.xml.in'
--- plugins/expo/expo.xml.in 2015-10-26 17:15:43 +0000
+++ plugins/expo/expo.xml.in 2016-05-16 11:30:05 +0000
@@ -149,6 +149,12 @@
149 <_long>Vertical offset (in pixels).</_long>149 <_long>Vertical offset (in pixels).</_long>
150 <default>24</default>150 <default>24</default>
151 </option>151 </option>
152 <option name="y_bottom_offset" type="int">
153 <_short>Y Bottom Offset</_short>
154 <_long>Vertical offset from the bottom (in pixels).</_long>
155 <default>0</default>
156 <min>0</min>
157 </option>
152 <option name="distance" type="float">158 <option name="distance" type="float">
153 <_short>Camera Distance</_short>159 <_short>Camera Distance</_short>
154 <_long>The distance between the camera and the exposed viewports.</_long>160 <_long>The distance between the camera and the exposed viewports.</_long>
155161
=== modified file 'plugins/expo/src/expo.cpp'
--- plugins/expo/src/expo.cpp 2015-10-20 15:12:34 +0000
+++ plugins/expo/src/expo.cpp 2016-05-16 11:30:05 +0000
@@ -921,6 +921,8 @@
921 /* translate expo to center */921 /* translate expo to center */
922 sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,922 sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,
923 vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);923 vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);
924
925 worldScaleFactorY -= (float)optionGetYBottomOffset () / (float)output->height ();
924 sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);926 sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);
925927
926928
927929
=== modified file 'plugins/scale/include/scale/scale.h'
--- plugins/scale/include/scale/scale.h 2014-04-15 16:47:09 +0000
+++ plugins/scale/include/scale/scale.h 2016-05-16 11:30:05 +0000
@@ -137,7 +137,7 @@
137 public:137 public:
138 ScaleWindow (CompWindow *w);138 ScaleWindow (CompWindow *w);
139 ~ScaleWindow ();139 ~ScaleWindow ();
140 140
141 CompWindow *window;141 CompWindow *window;
142142
143 bool hasSlot () const;143 bool hasSlot () const;
144144
=== modified file 'plugins/scale/scale.xml.in'
--- plugins/scale/scale.xml.in 2015-10-26 17:15:43 +0000
+++ plugins/scale/scale.xml.in 2016-05-16 11:30:05 +0000
@@ -33,7 +33,13 @@
33 </option>33 </option>
34 <option name="y_offset" type="int">34 <option name="y_offset" type="int">
35 <_short>Y Offset</_short>35 <_short>Y Offset</_short>
36 <_long>Vertical offset (in pixels).</_long>36 <_long>Vertical offset from the top (in pixels).</_long>
37 <min>0</min>
38 <default>0</default>
39 </option>
40 <option name="y_bottom_offset" type="int">
41 <_short>Y Bottom Offset</_short>
42 <_long>Vertical offset from the bottom (in pixels).</_long>)
37 <min>0</min>43 <min>0</min>
38 <default>0</default>44 <default>0</default>
39 </option>45 </option>
4046
=== modified file 'plugins/scale/src/scale.cpp'
--- plugins/scale/src/scale.cpp 2015-11-16 12:14:14 +0000
+++ plugins/scale/src/scale.cpp 2016-05-16 11:30:05 +0000
@@ -509,7 +509,7 @@
509 int nSlots = 0;509 int nSlots = 0;
510510
511 y = optionGetYOffset() + workArea.y () + spacing;511 y = optionGetYOffset() + workArea.y () + spacing;
512 height = (workArea.height () - optionGetYOffset() - (lines + 1) * spacing) / lines;512 height = (workArea.height () - optionGetYOffset () - optionGetYBottomOffset () - (lines + 1) * spacing) / lines;
513513
514 for (int i = 0; i < lines; i++)514 for (int i = 0; i < lines; i++)
515 {515 {
@@ -1752,6 +1752,7 @@
1752 CompRect workArea (screen->currentOutputDev ().workArea ());1752 CompRect workArea (screen->currentOutputDev ().workArea ());
1753 workArea.setX (workArea.x() + optionGetXOffset ());1753 workArea.setX (workArea.x() + optionGetXOffset ());
1754 workArea.setY (workArea.y() + optionGetYOffset ());1754 workArea.setY (workArea.y() + optionGetYOffset ());
1755 workArea.setBottom (workArea.bottom () + optionGetYBottomOffset ());
17551756
1756 if (workArea.contains (pointer))1757 if (workArea.contains (pointer))
1757 {1758 {

Subscribers

People subscribed via source and target branches