summaryrefslogtreecommitdiff
path: root/openbox/actions/maximize.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-12-17 10:23:48 -0500
committerDana Jansens <danakj@orodu.net>2009-12-17 10:23:49 -0500
commitd18d9c9379e3387073fc9346e9857fdde077b985 (patch)
tree753dd70aec47f7fc23862c3180f9b483a37ab06a /openbox/actions/maximize.c
parent50d662681160c309ea86268c0d05794b87b75593 (diff)
Make it possible for an action name to choose whether it is interactive or not based on its options.
This way we can use the same name with options for an interactive action and a non-interactive action. Shorten the names of the ObActionsInteractive* functions to ObActionsI* Add a ObActionsIPreFunc that is called for interactive actions before the interactivity (key/mouse grab) is started. Add a ObActionsIPostFunc that is called for interactive actions after the interactiviti (key/mouse grab) has ended.
Diffstat (limited to 'openbox/actions/maximize.c')
-rw-r--r--openbox/actions/maximize.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/openbox/actions/maximize.c b/openbox/actions/maximize.c
index 5cc7141b..90a84039 100644
--- a/openbox/actions/maximize.c
+++ b/openbox/actions/maximize.c
@@ -23,31 +23,28 @@ static gpointer setup_vert_func(xmlNodePtr node);
void action_maximize_startup(void)
{
- actions_register("Maximize", setup_func, g_free, run_func_on,
- NULL, NULL);
- actions_register("Unmaximize", setup_func, g_free, run_func_off,
- NULL, NULL);
- actions_register("ToggleMaximize", setup_func, g_free, run_func_toggle,
- NULL, NULL);
+ actions_register("Maximize", setup_func, g_free, run_func_on);
+ actions_register("Unmaximize", setup_func, g_free, run_func_off);
+ actions_register("ToggleMaximize", setup_func, g_free, run_func_toggle);
/* 3.4-compatibility */
actions_register("MaximizeFull", setup_both_func, g_free,
- run_func_on, NULL, NULL);
+ run_func_on);
actions_register("UnmaximizeFull", setup_both_func, g_free,
- run_func_off, NULL, NULL);
+ run_func_off);
actions_register("ToggleMaximizeFull", setup_both_func, g_free,
- run_func_toggle, NULL, NULL);
+ run_func_toggle);
actions_register("MaximizeHorz", setup_horz_func, g_free,
- run_func_on, NULL, NULL);
+ run_func_on);
actions_register("UnmaximizeHorz", setup_horz_func, g_free,
- run_func_off, NULL, NULL);
+ run_func_off);
actions_register("ToggleMaximizeHorz", setup_horz_func, g_free,
- run_func_toggle, NULL, NULL);
+ run_func_toggle);
actions_register("MaximizeVert", setup_vert_func, g_free,
- run_func_on, NULL, NULL);
+ run_func_on);
actions_register("UnmaximizeVert", setup_vert_func, g_free,
- run_func_off, NULL, NULL);
+ run_func_off);
actions_register("ToggleMaximizeVert", setup_vert_func, g_free,
- run_func_toggle, NULL, NULL);
+ run_func_toggle);
}
static gpointer setup_func(xmlNodePtr node)