all repos — openbox @ b89cc5859068fd5543dc9e7da3f469fb0c0a7a1c

openbox fork - make it a bit more like ryudo

Add all the action names used in 3.4 so configs don't break
Mikael Magnusson mikachu@gmail.com
commit

b89cc5859068fd5543dc9e7da3f469fb0c0a7a1c

parent

308478e4a5f4dc76d69395dda8a9bc42cb69eec4

M Makefile.amMakefile.am

@@ -202,6 +202,7 @@ openbox/actions/resize.c \

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 \
M openbox/actions/addremovedesktop.copenbox/actions/addremovedesktop.c

@@ -11,12 +11,27 @@ 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) { actions_register("AddDesktop", setup_add_func, g_free, run_func, 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); }

@@ -69,3 +84,32 @@ actions_client_move(data, FALSE);

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; +}
M openbox/actions/all.copenbox/actions/all.c

@@ -39,4 +39,6 @@ action_movetoedge_startup();

action_growtoedge_startup(); action_if_startup(); action_focustobottom_startup(); + /* 3.4-compatibility */ + action_shadelowerraise_startup(); }
M openbox/actions/all.hopenbox/actions/all.h

@@ -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
M openbox/actions/desktop.copenbox/actions/desktop.c

@@ -29,12 +29,62 @@

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) { actions_register("GoToDesktop", setup_go_func, g_free, run_func, 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); }

@@ -44,7 +94,7 @@ xmlNodePtr n;

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 @@ actions_client_move(data, FALSE);

} 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; +}
M openbox/actions/directionalwindows.copenbox/actions/directionalwindows.c

@@ -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 @@ state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);

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; +} +
M openbox/actions/growtoedge.copenbox/actions/growtoedge.c

@@ -13,6 +13,11 @@

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 @@ actions_register("GrowToEdge", setup_func,

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 @@ return FALSE;

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; +}
M openbox/actions/layer.copenbox/actions/layer.c

@@ -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) {

@@ -18,6 +22,13 @@ run_func, NULL, NULL);

actions_register("ToggleAlwaysOnBottom", setup_func_bottom, g_free, 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); }

@@ -87,3 +98,29 @@ }

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; +} +
M openbox/actions/maximize.copenbox/actions/maximize.c

@@ -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 @@ actions_register("Unmaximize", setup_func, g_free, run_func_off,

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 @@ actions_client_move(data, FALSE);

} 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; +} +
M openbox/actions/moveresizeto.copenbox/actions/moveresizeto.c

@@ -25,10 +25,15 @@ } Options;

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 @@ }

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; +}
M openbox/actions/movetoedge.copenbox/actions/movetoedge.c

@@ -11,10 +11,24 @@ } Options;

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 @@ }

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; +} +
A openbox/actions/shadelowerraise.c

@@ -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; +}