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 \
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)
{
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)
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;
+}
action_growtoedge_startup();
action_if_startup();
action_focustobottom_startup();
+ /* 3.4-compatibility */
+ action_shadelowerraise_startup();
}
void action_growtoedge_startup(void);
void action_if_startup(void);
void action_focustobottom_startup(void);
+/* 3.4-compatibility */
+void action_shadelowerraise_startup(void);
#endif
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)
{
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)
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! */
}
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;
+}
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)
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;
+}
+
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)
{
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)
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;
+}
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)
{
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)
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;
+}
+
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)
{
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)
}
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;
+}
+
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,
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;
+}
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)
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;
+}
+
--- /dev/null
+#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;
+}