summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/rotate.c
diff options
context:
space:
mode:
authorkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-03 14:25:35 +0000
committerkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-03 14:25:35 +0000
commitcf3041588008873a944574c5538dcb3409a527a3 (patch)
treeb82c0609eb5837b712659764fc704c8331591df8 /beryl-plugins/src/rotate.c
parent5f2b53c16d32f505f45f60cef196c5d3e78504f8 (diff)
downloadmarex-dev-cf3041588008873a944574c5538dcb3409a527a3.tar.gz
marex-dev-cf3041588008873a944574c5538dcb3409a527a3.tar.bz2
rotate.c: Add sticky rotation init (Initate binding with no terminate).
git-svn-id: file:///beryl/trunk@2307 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/rotate.c')
-rw-r--r--beryl-plugins/src/rotate.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/beryl-plugins/src/rotate.c b/beryl-plugins/src/rotate.c
index 5983636..7614ce5 100644
--- a/beryl-plugins/src/rotate.c
+++ b/beryl-plugins/src/rotate.c
@@ -53,6 +53,9 @@
#define ROTATE_INITIATE_BUTTON_DEFAULT Button1
#define ROTATE_INITIATE_MODIFIERS_DEFAULT (ControlMask | CompAltMask)
+#define ROTATE_INITIATE_STICKY_BUTTON_DEFAULT Button2
+#define ROTATE_INITIATE_STICKY_MODIFIERS_DEFAULT (ControlMask | CompAltMask)
+
#define ROTATE_INITIATEDESKTOP_BUTTON_DEFAULT Button2
#define ROTATE_INITIATEDESKTOP_MODIFIERS_DEFAULT 0
@@ -170,7 +173,9 @@ static int displayPrivateIndex;
#define ROTATE_DISPLAY_OPTION_UP 40
#define ROTATE_DISPLAY_OPTION_DOWN 41
#define ROTATE_DISPLAY_OPTION_INITIATEDESKTOP 42
-#define ROTATE_DISPLAY_OPTION_NUM 43
+#define ROTATE_DISPLAY_OPTION_STICKY_INITIATE 43
+
+#define ROTATE_DISPLAY_OPTION_NUM 44
typedef struct _RotateDisplay
{
@@ -2246,6 +2251,7 @@ rotateSetDisplayOption(CompDisplay * display,
case ROTATE_DISPLAY_OPTION_FLIP_LEFT:
case ROTATE_DISPLAY_OPTION_FLIP_RIGHT:
case ROTATE_DISPLAY_OPTION_INITIATEDESKTOP:
+ case ROTATE_DISPLAY_OPTION_STICKY_INITIATE:
if (setDisplayAction(display, o, value))
return TRUE;
break;
@@ -2296,6 +2302,26 @@ static void rotateDisplayInitOptions(RotateDisplay * rd)
o->value.action.button.modifiers = ROTATE_INITIATE_MODIFIERS_DEFAULT;
o->value.action.button.button = ROTATE_INITIATE_BUTTON_DEFAULT;
+ o = &rd->opt[ROTATE_DISPLAY_OPTION_STICKY_INITIATE];
+ o->advanced = False;
+ o->name = "initiate_sticky";
+ o->group = N_("Bindings");
+ o->subGroup = N_("Initiate");
+ o->displayHints = "";
+ o->shortDesc = N_("Initiate sticky");
+ o->longDesc = N_("Start Rotation and don't finish it until specifily terminated by"
+ " the normal iniate.");
+ o->type = CompOptionTypeAction;
+ o->value.action.initiate = rotateInitiate;
+ o->value.action.terminate = 0;
+ o->value.action.bell = FALSE;
+ o->value.action.edgeMask = 0;
+ o->value.action.state = CompActionStateInitKey;
+ o->value.action.state |= CompActionStateInitButton;
+ o->value.action.type = CompBindingTypeButton;
+ o->value.action.button.modifiers = ROTATE_INITIATE_STICKY_MODIFIERS_DEFAULT;
+ o->value.action.button.button = ROTATE_INITIATE_STICKY_BUTTON_DEFAULT;
+
o = &rd->opt[ROTATE_DISPLAY_OPTION_WHEELINGS];
o->advanced = False;
o->name = "rotate_wheelings";