diff options
author | Guillaume Seguin <guillaume@segu.in> | 2007-07-26 13:01:41 -0400 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2007-07-26 13:01:41 -0400 |
commit | 75e518c7c18a94425165f1a0abc3220094893045 (patch) | |
tree | aba954c98a57852913eeb75beeb09d0df511cf5b | |
parent | e3d0c46f80a09b710f46636b8288a7ae25dfac33 (diff) |
Add raise_on_rotate option.
-rw-r--r-- | metadata/rotate.xml.in | 5 | ||||
-rw-r--r-- | plugins/rotate.c | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/metadata/rotate.xml.in b/metadata/rotate.xml.in index 83e4f03f..b4dd9a50 100644 --- a/metadata/rotate.xml.in +++ b/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"> diff --git a/plugins/rotate.c b/plugins/rotate.c index 9e5a9d9f..fc4172e2 100644 --- a/plugins/rotate.c +++ b/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 |