]> Dogcows Code - chaz/openbox/commitdiff
Add all the action names used in 3.4 so configs don't break
authorMikael Magnusson <mikachu@gmail.com>
Sat, 19 Sep 2009 13:57:20 +0000 (15:57 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sat, 19 Sep 2009 13:57:20 +0000 (15:57 +0200)
12 files changed:
Makefile.am
openbox/actions/addremovedesktop.c
openbox/actions/all.c
openbox/actions/all.h
openbox/actions/desktop.c
openbox/actions/directionalwindows.c
openbox/actions/growtoedge.c
openbox/actions/layer.c
openbox/actions/maximize.c
openbox/actions/moveresizeto.c
openbox/actions/movetoedge.c
openbox/actions/shadelowerraise.c [new file with mode: 0644]

index bc0ff88a2ff2c5110c3501681ce134ca44d69acf..0c1b9b095f68960d7aae531509dfab4dd09be1dc 100644 (file)
@@ -202,6 +202,7 @@ openbox_openbox_SOURCES = \
        openbox/actions/resizerelative.c \
        openbox/actions/restart.c \
        openbox/actions/shade.c \
+       openbox/actions/shadelowerraise.c \
        openbox/actions/showdesktop.c \
        openbox/actions/showmenu.c \
        openbox/actions/unfocus.c \
index b6e621ab0c5f74a523f748a86caa76c6f554548e..1e7f0b57ac4b18a9e00d4e0f7d0aa40a0136b0c3 100644 (file)
@@ -11,6 +11,11 @@ static gpointer setup_func(xmlNodePtr node);
 static gpointer setup_add_func(xmlNodePtr node);
 static gpointer setup_remove_func(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_addcurrent_func(xmlNodePtr node);
+static gpointer setup_addlast_func(xmlNodePtr node);
+static gpointer setup_removecurrent_func(xmlNodePtr node);
+static gpointer setup_removelast_func(xmlNodePtr node);
 
 void action_addremovedesktop_startup(void)
 {
@@ -18,6 +23,16 @@ void action_addremovedesktop_startup(void)
                      NULL, NULL);
     actions_register("RemoveDesktop", setup_remove_func, g_free, run_func,
                      NULL, NULL);
+
+    /* 3.4-compatibility */
+    actions_register("AddDesktopLast", setup_addlast_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("RemoveDesktopLast", setup_removelast_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("AddDesktopCurrent", setup_addcurrent_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("RemoveDesktopCurrent", setup_removecurrent_func, g_free, run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -69,3 +84,32 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_addcurrent_func(xmlNodePtr node)
+{
+    Options *o = setup_add_func(node);
+    o->current = TRUE;
+    return o;
+}
+
+static gpointer setup_addlast_func(xmlNodePtr node)
+{
+    Options *o = setup_add_func(node);
+    o->current = FALSE;
+    return o;
+}
+
+static gpointer setup_removecurrent_func(xmlNodePtr node)
+{
+    Options *o = setup_remove_func(node);
+    o->current = TRUE;
+    return o;
+}
+
+static gpointer setup_removelast_func(xmlNodePtr node)
+{
+    Options *o = setup_remove_func(node);
+    o->current = FALSE;
+    return o;
+}
index c86c4281abfde8fe76c59084314ea1a676d39e45..952d756dfce343a658c6b39fad2a663cb0a0488a 100644 (file)
@@ -39,4 +39,6 @@ void action_all_startup(void)
     action_growtoedge_startup();
     action_if_startup();
     action_focustobottom_startup();
+    /* 3.4-compatibility */
+    action_shadelowerraise_startup();
 }
index 909836ae7a837ac566e17fca56ef3ef2beb8824e..1f520b93f1a2d4abc130f86329274844737f1304 100644 (file)
@@ -40,5 +40,7 @@ void action_movetoedge_startup(void);
 void action_growtoedge_startup(void);
 void action_if_startup(void);
 void action_focustobottom_startup(void);
+/* 3.4-compatibility */
+void action_shadelowerraise_startup(void);
 
 #endif
index edd22aa2bc7ac55bf632c56630c8f1669070bf8d..50caa22ffa0b231caba07ce84bc7f8bc4e7af29e 100644 (file)
@@ -29,6 +29,23 @@ typedef struct {
 static gpointer setup_go_func(xmlNodePtr node);
 static gpointer setup_send_func(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_go_last_func(xmlNodePtr node);
+static gpointer setup_send_last_func(xmlNodePtr node);
+static gpointer setup_go_abs_func(xmlNodePtr node);
+static gpointer setup_send_abs_func(xmlNodePtr node);
+static gpointer setup_go_next_func(xmlNodePtr node);
+static gpointer setup_send_next_func(xmlNodePtr node);
+static gpointer setup_go_prev_func(xmlNodePtr node);
+static gpointer setup_send_prev_func(xmlNodePtr node);
+static gpointer setup_go_left_func(xmlNodePtr node);
+static gpointer setup_send_left_func(xmlNodePtr node);
+static gpointer setup_go_right_func(xmlNodePtr node);
+static gpointer setup_send_right_func(xmlNodePtr node);
+static gpointer setup_go_up_func(xmlNodePtr node);
+static gpointer setup_send_up_func(xmlNodePtr node);
+static gpointer setup_go_down_func(xmlNodePtr node);
+static gpointer setup_send_down_func(xmlNodePtr node);
 
 void action_desktop_startup(void)
 {
@@ -36,6 +53,39 @@ void action_desktop_startup(void)
                      NULL, NULL);
     actions_register("SendToDesktop", setup_send_func, g_free, run_func,
                      NULL, NULL);
+    /* 3.4-compatibility */
+    actions_register("DesktopLast", setup_go_last_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopLast", setup_send_last_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("Desktop", setup_go_abs_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktop", setup_send_abs_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("DesktopNext", setup_go_next_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopNext", setup_send_next_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("DesktopPrevious", setup_go_prev_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopPrevious", setup_send_prev_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("DesktopLeft", setup_go_left_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopLeft", setup_send_left_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("DesktopRight", setup_go_right_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopRight", setup_send_right_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("DesktopUp", setup_go_up_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopUp", setup_send_up_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("DesktopDown", setup_go_down_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("SendToDesktopDown", setup_send_down_func, g_free, run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_go_func(xmlNodePtr node)
@@ -44,7 +94,7 @@ static gpointer setup_go_func(xmlNodePtr node)
     Options *o;
 
     o = g_new0(Options, 1);
-    /* don't go anywhere if theres no options given */
+    /* don't go anywhere if there are no options given */
     o->type = ABSOLUTE;
     o->u.abs.desktop = screen_desktop;
     /* wrap by default - it's handy! */
@@ -150,3 +200,150 @@ static gboolean run_func(ObActionsData *data, gpointer options)
     }
     return FALSE;
 }
+
+/* 3.4-compatilibity */
+static gpointer setup_follow(xmlNodePtr node)
+{
+    xmlNodePtr n;
+    Options *o = g_new0(Options, 1);
+    o->send = TRUE;
+    o->follow = TRUE;
+    if ((n = obt_parse_find_node(node, "follow")))
+        o->follow = obt_parse_node_bool(n);
+    return o;
+}
+
+static gpointer setup_go_last_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->type = LAST;
+    return o;
+}
+
+static gpointer setup_send_last_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    o->type = LAST;
+    return o;
+}
+
+static gpointer setup_go_abs_func(xmlNodePtr node)
+{
+    xmlNodePtr n;
+    Options *o = g_new0(Options, 1);
+    o->type = ABSOLUTE;
+    if ((n = obt_parse_find_node(node, "desktop")))
+        o->u.abs.desktop = obt_parse_node_int(n) - 1;
+    else
+        o->u.abs.desktop = screen_desktop;
+    return o;
+}
+
+static gpointer setup_send_abs_func(xmlNodePtr node)
+{
+    xmlNodePtr n;
+    Options *o = setup_follow(node);
+    o->type = ABSOLUTE;
+    if ((n = obt_parse_find_node(node, "desktop")))
+        o->u.abs.desktop = obt_parse_node_int(n) - 1;
+    else
+        o->u.abs.desktop = screen_desktop;
+    return o;
+}
+
+static void setup_rel(Options *o, xmlNodePtr node, gboolean lin, ObDirection dir)
+{
+    xmlNodePtr n;
+
+    o->type = RELATIVE;
+    o->u.rel.linear = lin;
+    o->u.rel.dir = dir;
+    o->u.rel.wrap = TRUE;
+
+    if ((n = obt_parse_find_node(node, "wrap")))
+        o->u.rel.wrap = obt_parse_node_bool(n);
+}
+
+static gpointer setup_go_next_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    setup_rel(o, node, TRUE, OB_DIRECTION_EAST);
+    return o;
+}
+
+static gpointer setup_send_next_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    setup_rel(o, node, TRUE, OB_DIRECTION_EAST);
+    return o;
+}
+
+static gpointer setup_go_prev_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    setup_rel(o, node, TRUE, OB_DIRECTION_WEST);
+    return o;
+}
+
+static gpointer setup_send_prev_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    setup_rel(o, node, TRUE, OB_DIRECTION_WEST);
+    return o;
+}
+
+static gpointer setup_go_left_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    setup_rel(o, node, FALSE, OB_DIRECTION_WEST);
+    return o;
+}
+
+static gpointer setup_send_left_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    setup_rel(o, node, FALSE, OB_DIRECTION_WEST);
+    return o;
+}
+
+static gpointer setup_go_right_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    setup_rel(o, node, FALSE, OB_DIRECTION_EAST);
+    return o;
+}
+
+static gpointer setup_send_right_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    setup_rel(o, node, FALSE, OB_DIRECTION_EAST);
+    return o;
+}
+
+static gpointer setup_go_up_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    setup_rel(o, node, FALSE, OB_DIRECTION_NORTH);
+    return o;
+}
+
+static gpointer setup_send_up_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    setup_rel(o, node, FALSE, OB_DIRECTION_NORTH);
+    return o;
+}
+
+static gpointer setup_go_down_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    setup_rel(o, node, FALSE, OB_DIRECTION_SOUTH);
+    return o;
+}
+
+static gpointer setup_send_down_func(xmlNodePtr node)
+{
+    Options *o = setup_follow(node);
+    setup_rel(o, node, FALSE, OB_DIRECTION_SOUTH);
+    return o;
+}
index d3633d507356aff655be907e9414c3772e16954c..acd4f8a2b2388d34092c3ba86ff448cb6af49d79 100644 (file)
@@ -33,12 +33,63 @@ static void     i_cancel_func(gpointer options);
 
 static void     end_cycle(gboolean cancel, guint state, Options *o);
 
+/* 3.4-compatibility */
+static gpointer setup_north_cycle_func(xmlNodePtr node);
+static gpointer setup_south_cycle_func(xmlNodePtr node);
+static gpointer setup_east_cycle_func(xmlNodePtr node);
+static gpointer setup_west_cycle_func(xmlNodePtr node);
+static gpointer setup_northwest_cycle_func(xmlNodePtr node);
+static gpointer setup_northeast_cycle_func(xmlNodePtr node);
+static gpointer setup_southwest_cycle_func(xmlNodePtr node);
+static gpointer setup_southeast_cycle_func(xmlNodePtr node);
+static gpointer setup_north_target_func(xmlNodePtr node);
+static gpointer setup_south_target_func(xmlNodePtr node);
+static gpointer setup_east_target_func(xmlNodePtr node);
+static gpointer setup_west_target_func(xmlNodePtr node);
+static gpointer setup_northwest_target_func(xmlNodePtr node);
+static gpointer setup_northeast_target_func(xmlNodePtr node);
+static gpointer setup_southwest_target_func(xmlNodePtr node);
+static gpointer setup_southeast_target_func(xmlNodePtr node);
+
 void action_directionalwindows_startup(void)
 {
     actions_register("DirectionalCycleWindows", setup_cycle_func, free_func,
                      run_func, i_input_func, i_cancel_func);
     actions_register("DirectionalTargetWindow", setup_target_func, free_func,
                      run_func, NULL, NULL);
+    /* 3.4-compatibility */
+    actions_register("DirectionalFocusNorth", setup_north_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusSouth", setup_south_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusWest", setup_west_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusEast", setup_east_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusNorthWest", setup_northwest_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusNorthEast", setup_northeast_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusSouthWest", setup_southwest_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalFocusSouthEast", setup_southeast_cycle_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetNorth", setup_north_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetSouth", setup_south_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetWest", setup_west_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetEast", setup_east_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetNorthWest", setup_northwest_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetNorthEast", setup_northeast_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetSouthWest", setup_southwest_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
+    actions_register("DirectionalTargetSouthEast", setup_southeast_target_func,
+                     free_func, run_func, i_input_func, i_cancel_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -216,3 +267,117 @@ static void end_cycle(gboolean cancel, guint state, Options *o)
 
     stacking_restore();
 }
+
+/* 3.4-compatibility */
+static gpointer setup_north_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_south_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_east_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_west_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_WEST;
+    return o;
+}
+
+static gpointer setup_northwest_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_NORTHWEST;
+    return o;
+}
+
+static gpointer setup_northeast_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_southwest_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_SOUTHWEST;
+    return o;
+}
+
+static gpointer setup_southeast_cycle_func(xmlNodePtr node)
+{
+    Options *o = setup_cycle_func(node);
+    o->direction = OB_DIRECTION_SOUTHEAST;
+    return o;
+}
+
+static gpointer setup_north_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_south_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_east_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_west_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_WEST;
+    return o;
+}
+
+static gpointer setup_northwest_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_NORTHWEST;
+    return o;
+}
+
+static gpointer setup_northeast_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_NORTHEAST;
+    return o;
+}
+
+static gpointer setup_southwest_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_SOUTHWEST;
+    return o;
+}
+
+static gpointer setup_southeast_target_func(xmlNodePtr node)
+{
+    Options *o = setup_target_func(node);
+    o->direction = OB_DIRECTION_SOUTHEAST;
+    return o;
+}
+
index a37e3a26e093606100ea82581e368bcf7bb4fff1..2a31496ab3a8e32330588e37b630614659f57783 100644 (file)
@@ -13,6 +13,11 @@ typedef struct {
 static gpointer setup_func(xmlNodePtr node);
 static gpointer setup_shrink_func(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_north_func(xmlNodePtr node);
+static gpointer setup_south_func(xmlNodePtr node);
+static gpointer setup_east_func(xmlNodePtr node);
+static gpointer setup_west_func(xmlNodePtr node);
 
 void action_growtoedge_startup(void)
 {
@@ -20,6 +25,15 @@ void action_growtoedge_startup(void)
                      g_free, run_func, NULL, NULL);
     actions_register("ShrinkToEdge", setup_shrink_func,
                      g_free, run_func, NULL, NULL);
+    /* 3.4-compatibility */
+    actions_register("GrowToEdgeNorth", setup_north_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("GrowToEdgeSouth", setup_south_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("GrowToEdgeEast", setup_east_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("GrowToEdgeWest", setup_west_func, g_free, run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -149,3 +163,36 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_north_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->shrink = FALSE;
+    o->dir = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_south_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->shrink = FALSE;
+    o->dir = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_east_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->shrink = FALSE;
+    o->dir = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_west_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->shrink = FALSE;
+    o->dir = OB_DIRECTION_WEST;
+    return o;
+}
index bbfda57218f122ae1784dc11ba03c9372d4cebf1..1d522bbc87824e6b82ae5a9c6fccdbf5dc4292d8 100644 (file)
@@ -10,6 +10,10 @@ static gpointer setup_func_top(xmlNodePtr node);
 static gpointer setup_func_bottom(xmlNodePtr node);
 static gpointer setup_func_send(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_sendtop_func(xmlNodePtr node);
+static gpointer setup_sendbottom_func(xmlNodePtr node);
+static gpointer setup_sendnormal_func(xmlNodePtr node);
 
 void action_layer_startup(void)
 {
@@ -19,6 +23,13 @@ void action_layer_startup(void)
                      run_func, NULL, NULL);
     actions_register("SendToLayer", setup_func_send, g_free,
                      run_func, NULL, NULL);
+    /* 3.4-compatibility */
+    actions_register("SendToTopLayer", setup_sendtop_func, g_free,
+                     run_func, NULL, NULL);
+    actions_register("SendToBottomLayer", setup_sendbottom_func, g_free,
+                     run_func, NULL, NULL);
+    actions_register("SendToNormalLayer", setup_sendnormal_func, g_free,
+                     run_func, NULL, NULL);
 }
 
 static gpointer setup_func_top(xmlNodePtr node)
@@ -87,3 +98,29 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_sendtop_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->layer = 1;
+    o->toggle = FALSE;
+    return o;
+}
+
+static gpointer setup_sendbottom_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->layer = -1;
+    o->toggle = FALSE;
+    return o;
+}
+
+static gpointer setup_sendnormal_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->layer = 0;
+    o->toggle = FALSE;
+    return o;
+}
+
index 45e8b38ed55801812a61f897c473fbd860c5db08..5cc7141b6893d0abb0042d52e7649aeb6b1d4c75 100644 (file)
@@ -16,6 +16,10 @@ static gpointer setup_func(xmlNodePtr node);
 static gboolean run_func_on(ObActionsData *data, gpointer options);
 static gboolean run_func_off(ObActionsData *data, gpointer options);
 static gboolean run_func_toggle(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_both_func(xmlNodePtr node);
+static gpointer setup_horz_func(xmlNodePtr node);
+static gpointer setup_vert_func(xmlNodePtr node);
 
 void action_maximize_startup(void)
 {
@@ -25,6 +29,25 @@ void action_maximize_startup(void)
                      NULL, NULL);
     actions_register("ToggleMaximize", setup_func, g_free, run_func_toggle,
                      NULL, NULL);
+    /* 3.4-compatibility */
+    actions_register("MaximizeFull", setup_both_func, g_free,
+                     run_func_on, NULL, NULL);
+    actions_register("UnmaximizeFull", setup_both_func, g_free,
+                     run_func_off, NULL, NULL);
+    actions_register("ToggleMaximizeFull", setup_both_func, g_free,
+                     run_func_toggle, NULL, NULL);
+    actions_register("MaximizeHorz", setup_horz_func, g_free,
+                     run_func_on, NULL, NULL);
+    actions_register("UnmaximizeHorz", setup_horz_func, g_free,
+                     run_func_off, NULL, NULL);
+    actions_register("ToggleMaximizeHorz", setup_horz_func, g_free,
+                     run_func_toggle, NULL, NULL);
+    actions_register("MaximizeVert", setup_vert_func, g_free,
+                     run_func_on, NULL, NULL);
+    actions_register("UnmaximizeVert", setup_vert_func, g_free,
+                     run_func_off, NULL, NULL);
+    actions_register("ToggleMaximizeVert", setup_vert_func, g_free,
+                     run_func_toggle, NULL, NULL);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -89,3 +112,26 @@ static gboolean run_func_toggle(ObActionsData *data, gpointer options)
     }
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_both_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = BOTH;
+    return o;
+}
+
+static gpointer setup_horz_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = HORZ;
+    return o;
+}
+
+static gpointer setup_vert_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = VERT;
+    return o;
+}
+
index 3ee3498a4cc3122c1c6dd054ff9ba918717ff6d9..1d9e52f1f8ca244187fc5cb18085f5b266f603f4 100644 (file)
@@ -25,10 +25,15 @@ typedef struct {
 
 static gpointer setup_func(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_center_func(xmlNodePtr node);
 
 void action_moveresizeto_startup(void)
 {
     actions_register("MoveResizeTo", setup_func, g_free, run_func, NULL, NULL);
+/* 3.4-compatibility */
+    actions_register("MoveToCenter", setup_center_func, g_free, run_func,
+                     NULL, NULL);
 }
 
 static void parse_coord(xmlNodePtr n, gint *pos,
@@ -168,3 +173,19 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_center_func(xmlNodePtr node)
+{
+    Options *o;
+
+    o = g_new0(Options, 1);
+    o->x = G_MININT;
+    o->y = G_MININT;
+    o->w = G_MININT;
+    o->h = G_MININT;
+    o->monitor = -1;
+    o->xcenter = TRUE;
+    o->ycenter = TRUE;
+    return o;
+}
index f360ddd03da63309ea0da0ddc26a989b350a7e8e..51215fd2cab5ae9ebd74621887fe4eba625f8ab3 100644 (file)
@@ -11,10 +11,24 @@ typedef struct {
 
 static gpointer setup_func(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_north_func(xmlNodePtr node);
+static gpointer setup_south_func(xmlNodePtr node);
+static gpointer setup_east_func(xmlNodePtr node);
+static gpointer setup_west_func(xmlNodePtr node);
 
 void action_movetoedge_startup(void)
 {
     actions_register("MoveToEdge", setup_func, g_free, run_func, NULL, NULL);
+    /* 3.4-compatibility */
+    actions_register("MoveToEdgeNorth", setup_north_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("MoveToEdgeSouth", setup_south_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("MoveToEdgeEast", setup_east_func, g_free, run_func,
+                     NULL, NULL);
+    actions_register("MoveToEdgeWest", setup_west_func, g_free, run_func,
+                     NULL, NULL);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -63,3 +77,33 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_north_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_NORTH;
+    return o;
+}
+
+static gpointer setup_south_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_SOUTH;
+    return o;
+}
+
+static gpointer setup_east_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_EAST;
+    return o;
+}
+
+static gpointer setup_west_func(xmlNodePtr node)
+{
+    Options *o = g_new0(Options, 1);
+    o->dir = OB_DIRECTION_WEST;
+    return o;
+}
+
diff --git a/openbox/actions/shadelowerraise.c b/openbox/actions/shadelowerraise.c
new file mode 100644 (file)
index 0000000..1070a96
--- /dev/null
@@ -0,0 +1,40 @@
+#include "openbox/actions.h"
+#include "openbox/client.h"
+
+static gboolean run_func_sl(ObActionsData *data, gpointer options);
+static gboolean run_func_ur(ObActionsData *data, gpointer options);
+
+void action_shadelowerraise_startup()
+{
+    /* 3.4-compatibility */
+    actions_register("ShadeLower", NULL, NULL, run_func_sl, NULL, NULL);
+    actions_register("UnshadeRaise", NULL, NULL, run_func_ur, NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func_sl(ObActionsData *data, gpointer options)
+{
+    if (data->client) {
+        actions_client_move(data, TRUE);
+        if (data->client->shaded)
+            stacking_lower(CLIENT_AS_WINDOW(data->client));
+        else
+            client_shade(data->client, TRUE);
+        actions_client_move(data, FALSE);
+    }
+    return FALSE;
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func_ur(ObActionsData *data, gpointer options)
+{
+    if (data->client) {
+        actions_client_move(data, TRUE);
+        if (data->client->shaded)
+            client_shade(data->client, FALSE);
+        else
+            stacking_raise(CLIENT_AS_WINDOW(data->client));
+        actions_client_move(data, FALSE);
+    }
+    return FALSE;
+}
This page took 0.050429 seconds and 4 git commands to generate.