[fusion-commits] compiz mirror: Changes to 'master' (75e518c7c18a94425165f1a0abc3220094893045)
compiz at server.beryl-project.org
compiz at server.beryl-project.org
Thu Jul 26 19:36:05 CEST 2007
New commits:
commit 75e518c7c18a94425165f1a0abc3220094893045
Author: Guillaume Seguin <guillaume at segu.in>
Date: Thu Jul 26 13:01:41 2007 -0400
Add raise_on_rotate option.
metadata/rotate.xml.in | 5 +++++
plugins/rotate.c | 14 +++++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
Modified: compiz/metadata/rotate.xml.in
===================================================================
--- compiz/metadata/rotate.xml.in
+++ compiz/metadata/rotate.xml.in
@@ -217,6 +217,11 @@
<edges right="true"/>
</default>
</option>
+ <option name="raise_on_rotate" type="bool">
+ <_short>Raise on rotate</_short>
+ <_long>Raise window when rotating</_long>
+ <default>false</default>
+ </option>
</display>
<screen>
<option name="invert_y" type="bool">
Modified: compiz/plugins/rotate.c
===================================================================
--- compiz/plugins/rotate.c
+++ compiz/plugins/rotate.c
@@ -79,7 +79,8 @@ static int displayPrivateIndex;
#define ROTATE_DISPLAY_OPTION_WINDOW 34
#define ROTATE_DISPLAY_OPTION_FLIP_LEFT 35
#define ROTATE_DISPLAY_OPTION_FLIP_RIGHT 36
-#define ROTATE_DISPLAY_OPTION_NUM 37
+#define ROTATE_DISPLAY_OPTION_RAISE_ON_ROTATE 37
+#define ROTATE_DISPLAY_OPTION_NUM 38
typedef struct _RotateDisplay {
int screenPrivateIndex;
@@ -756,12 +757,15 @@ rotateWithWindow (CompDisplay *d,
CompScreen *s;
Window xid;
+ ROTATE_DISPLAY (d);
+
xid = getIntOptionNamed (option, nOption, "root", 0);
s = findScreenAtDisplay (d, xid);
if (s)
{
- int direction;
+ Bool raise = rd->opt[ROTATE_DISPLAY_OPTION_RAISE_ON_ROTATE].value.b;
+ int direction;
ROTATE_SCREEN (s);
@@ -792,6 +796,9 @@ rotateWithWindow (CompDisplay *d,
{
rs->moveWindow = w->id;
rs->moveWindowX = w->attrib.x;
+
+ if (raise)
+ raiseWindow (w);
}
}
}
@@ -1699,7 +1706,8 @@ static const CompMetadataOptionInfo rotateDisplayOptionInfo[] = {
{ "rotate_flip_left", "action", 0, rotateEdgeFlipLeft,
rotateFlipTerminate },
{ "rotate_flip_right", "action", 0, rotateEdgeFlipRight,
- rotateFlipTerminate }
+ rotateFlipTerminate },
+ { "raise_on_rotate", "bool", 0, 0, 0 }
};
static Bool
More information about the commits
mailing list