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 bc0ff88..0c1b9b0 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 b6e621a..1e7f0b5 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 c86c428..952d756 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 909836a..1f520b9 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 edd22aa..50caa22 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 d3633d5..acd4f8a 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 a37e3a2..2a31496 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 bbfda57..1d522bb 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 45e8b38..5cc7141 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 3ee3498..1d9e52f 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 f360ddd..51215fd 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;
+}