[beryl-commits] Cube reflection plugin: Changes to 'master' (044a9bb40f7e122d648b4f18f0621755c0b94cc7)

3v1n0 at server.beryl-project.org 3v1n0 at server.beryl-project.org
Sat Jun 23 00:12:26 CEST 2007


New commits:
commit 044a9bb40f7e122d648b4f18f0621755c0b94cc7
Author: Treviño - 3v1n0 <trevi55 at gmail.com>
Date:   Sat Jun 23 00:10:56 2007 +0200

    Added Auto zoom only on Mouse Rotate


 cubereflex.c   |    9 +++++++--
 cubereflex.xml |    5 +++++
 2 files changed, 12 insertions(+), 2 deletions(-)


Modified: fusion/plugins/cubereflex/cubereflex.c
===================================================================
--- fusion/plugins/cubereflex/cubereflex.c
+++ fusion/plugins/cubereflex/cubereflex.c
@@ -288,8 +288,13 @@ static void cubereflexPaintTransformedOutput(CompScreen * s,
 					break;
 					
 			}
-			rs->zTrans     = (cubereflexGetAutoZoom(s)) ?
-							 -point2[2] + cs->distance : 0.0;
+
+			if (!cubereflexGetAutoZoom(s) ||
+				((cs->rotationState == RotationChange) &&
+				cubereflexGetZoomManualOnly(s)))
+				rs->zTrans = 0.0;
+			else
+				rs->zTrans = -point2[2] + cs->distance;
 
 			if (cubereflexGetMode(s) == ModeAbove)
 				rs->zTrans      = 0.0;

Modified: fusion/plugins/cubereflex/cubereflex.xml
===================================================================
--- fusion/plugins/cubereflex/cubereflex.xml
+++ fusion/plugins/cubereflex/cubereflex.xml
@@ -55,6 +55,11 @@
 				<long>Zoom out automatically to myke the cube fit to the screen.</long>
 				<default>true</default>
 			</option>
+			<option name="zoom_manual_only" type="bool">
+				<short>Auto zoom only on Mouse Rotate</short>
+				<long>Zoom out automatically only on mouse rotate.</long>
+				<default>true</default>
+			</option>
 			<option name="mode" type="int">
 				<short>Reflection mode</short>
 				<long>Reflection mode.</long>



More information about the commits mailing list