From 0f9f4858ac1a145b182ae6e3c10adf34374edda5 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 29 Jul 2011 16:37:41 -0400 Subject: [PATCH] Actions say what kind of filter they would like by default (one window or all) --- openbox/action.c | 13 ++++++-- openbox/action.h | 11 ++++++ openbox/action_filter.h | 1 + openbox/actions/addremovedesktop.c | 50 +++------------------------- openbox/actions/breakchroot.c | 1 + openbox/actions/close.c | 3 +- openbox/actions/cyclewindows.c | 7 ++-- openbox/actions/debug.c | 3 +- openbox/actions/decorations.c | 9 +++-- openbox/actions/desktop.c | 6 ++-- openbox/actions/directionalwindows.c | 8 ++--- openbox/actions/dock.c | 6 ++-- openbox/actions/dockautohide.c | 3 +- openbox/actions/execute.c | 3 +- openbox/actions/exit.c | 3 +- openbox/actions/focus.c | 3 +- openbox/actions/focustobottom.c | 3 +- openbox/actions/fullscreen.c | 3 +- openbox/actions/growtoedge.c | 6 ++-- openbox/actions/iconify.c | 3 +- openbox/actions/kill.c | 3 +- openbox/actions/layer.c | 12 +++---- openbox/actions/lower.c | 3 +- openbox/actions/maximize.c | 9 +++-- openbox/actions/move.c | 3 +- openbox/actions/moverelative.c | 3 +- openbox/actions/moveresizeto.c | 3 +- openbox/actions/movetoedge.c | 3 +- openbox/actions/omnipresent.c | 3 +- openbox/actions/raise.c | 3 +- openbox/actions/raiselower.c | 3 +- openbox/actions/reconfigure.c | 3 +- openbox/actions/resize.c | 3 +- openbox/actions/resizerelative.c | 3 +- openbox/actions/restart.c | 3 +- openbox/actions/shade.c | 9 +++-- openbox/actions/showdesktop.c | 3 +- openbox/actions/showmenu.c | 3 +- openbox/actions/unfocus.c | 3 +- 39 files changed, 121 insertions(+), 102 deletions(-) diff --git a/openbox/action.c b/openbox/action.c index 229a73d2..99a28bb7 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -18,6 +18,7 @@ #include "action.h" #include "action_list.h" +#include "action_filter.h" #include "gettext.h" #include "grab.h" #include "screen.h" @@ -45,6 +46,7 @@ struct _ObActionDefinition { gchar *name; gboolean canbeinteractive; + ObActionDefaultFilter def_filter; union { ObActionIDataSetupFunc i; ObActionDataSetupFunc n; @@ -90,13 +92,15 @@ void action_shutdown(gboolean reconfig) } ObActionDefinition* do_register(const gchar *name, + ObActionDefaultFilter def_filter, ObActionDataFreeFunc free, ObActionRunFunc run) { GSList *it; ObActionDefinition *def; - g_assert(run != NULL); + g_return_val_if_fail(def_filter < OB_NUM_ACTION_DEFAULT_FILTERS, NULL); + g_return_val_if_fail(run != NULL, NULL); for (it = registered; it; it = g_slist_next(it)) { def = it->data; @@ -107,6 +111,7 @@ ObActionDefinition* do_register(const gchar *name, def = g_slice_new(ObActionDefinition); def->ref = 1; def->name = g_strdup(name); + def->def_filter = def_filter; def->free = free; def->run = run; def->shutdown = NULL; @@ -116,11 +121,12 @@ ObActionDefinition* do_register(const gchar *name, } gboolean action_register_i(const gchar *name, + ObActionDefaultFilter def_filter, ObActionIDataSetupFunc setup, ObActionDataFreeFunc free, ObActionRunFunc run) { - ObActionDefinition *def = do_register(name, free, run); + ObActionDefinition *def = do_register(name, def_filter, free, run); if (def) { def->canbeinteractive = TRUE; def->setup.i = setup; @@ -129,11 +135,12 @@ gboolean action_register_i(const gchar *name, } gboolean action_register(const gchar *name, + ObActionDefaultFilter def_filter, ObActionDataSetupFunc setup, ObActionDataFreeFunc free, ObActionRunFunc run) { - ObActionDefinition *def = do_register(name, free, run); + ObActionDefinition *def = do_register(name, def_filter, free, run); if (def) { def->canbeinteractive = FALSE; def->setup.n = setup; diff --git a/openbox/action.h b/openbox/action.h index 187bf590..2163154d 100644 --- a/openbox/action.h +++ b/openbox/action.h @@ -53,6 +53,15 @@ typedef gpointer (*ObActionIDataSetupFunc)(GHashTable *config, ObActionICancelFunc *cancel, ObActionIPostFunc *post); +/*! The default filter an action would like if no filter is provided by the + user */ +typedef enum { + OB_ACTION_DEFAULT_FILTER_EMPTY, + OB_ACTION_DEFAULT_FILTER_SINGLE, + OB_ACTION_DEFAULT_FILTER_ALL, + OB_NUM_ACTION_DEFAULT_FILTERS +} ObActionDefaultFilter; + struct _ObActionData { ObUserAction uact; guint state; @@ -69,11 +78,13 @@ void action_shutdown(gboolean reconfigure); /*! Use this if the actions created from this name may be interactive */ gboolean action_register_i(const gchar *name, + ObActionDefaultFilter def_filter, ObActionIDataSetupFunc setup, ObActionDataFreeFunc free, ObActionRunFunc run); gboolean action_register(const gchar *name, + ObActionDefaultFilter def_filter, ObActionDataSetupFunc setup, ObActionDataFreeFunc free, ObActionRunFunc run); diff --git a/openbox/action_filter.h b/openbox/action_filter.h index 31184b03..d9bf28e1 100644 --- a/openbox/action_filter.h +++ b/openbox/action_filter.h @@ -24,6 +24,7 @@ struct _ObClientSet; typedef struct _ObActionFilter ObActionFilter; typedef struct _ObActionFilterFuncs ObActionFilterFuncs; +typedef enum _ObActionFilterDefault ObActionFilterDefault; typedef gpointer (*ObActionFilterSetupFunc)(gboolean invert, struct _ObActionValue *v); diff --git a/openbox/actions/addremovedesktop.c b/openbox/actions/addremovedesktop.c index 85923e39..6c4593a9 100644 --- a/openbox/actions/addremovedesktop.c +++ b/openbox/actions/addremovedesktop.c @@ -13,26 +13,13 @@ static gpointer setup_add_func(GHashTable *config); static gpointer setup_remove_func(GHashTable *config); static void free_func(gpointer o); static gboolean run_func(ObActionData *data, gpointer options); -/* 3.4-compatibility */ -static gpointer setup_addcurrent_func(GHashTable *config); -static gpointer setup_addlast_func(GHashTable *config); -static gpointer setup_removecurrent_func(GHashTable *config); -static gpointer setup_removelast_func(GHashTable *config); void action_addremovedesktop_startup(void) { - action_register("AddDesktop", setup_add_func, free_func, run_func); - action_register("RemoveDesktop", setup_remove_func, free_func, run_func); - - /* 3.4-compatibility */ - action_register("AddDesktopLast", setup_addlast_func, - free_func, run_func); - action_register("RemoveDesktopLast", setup_removelast_func, - free_func, run_func); - action_register("AddDesktopCurrent", setup_addcurrent_func, - free_func, run_func); - action_register("RemoveDesktopCurrent", setup_removecurrent_func, - free_func, run_func); + action_register("AddDesktop", OB_ACTION_DEFAULT_FILTER_EMPTY, + setup_add_func, free_func, run_func); + action_register("RemoveDesktop", OB_ACTION_DEFAULT_FILTER_EMPTY, + setup_remove_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) @@ -89,32 +76,3 @@ static gboolean run_func(ObActionData *data, gpointer options) return FALSE; } - -/* 3.4-compatibility */ -static gpointer setup_addcurrent_func(GHashTable *config) -{ - Options *o = setup_add_func(config); - o->current = TRUE; - return o; -} - -static gpointer setup_addlast_func(GHashTable *config) -{ - Options *o = setup_add_func(config); - o->current = FALSE; - return o; -} - -static gpointer setup_removecurrent_func(GHashTable *config) -{ - Options *o = setup_remove_func(config); - o->current = TRUE; - return o; -} - -static gpointer setup_removelast_func(GHashTable *config) -{ - Options *o = setup_remove_func(config); - o->current = FALSE; - return o; -} diff --git a/openbox/actions/breakchroot.c b/openbox/actions/breakchroot.c index c46fa930..56e90a46 100644 --- a/openbox/actions/breakchroot.c +++ b/openbox/actions/breakchroot.c @@ -6,6 +6,7 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_breakchroot_startup(void) { action_register("BreakChroot", + OB_ACTION_DEFAULT_FILTER_EMPTY, NULL, NULL, run_func); } diff --git a/openbox/actions/close.c b/openbox/actions/close.c index b8f799bd..d3e5770c 100644 --- a/openbox/actions/close.c +++ b/openbox/actions/close.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_close_startup(void) { - action_register("Close", NULL, NULL, run_func); + action_register("Close", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/cyclewindows.c b/openbox/actions/cyclewindows.c index 5b91bf63..9ce5f5fe 100644 --- a/openbox/actions/cyclewindows.c +++ b/openbox/actions/cyclewindows.c @@ -55,9 +55,10 @@ static void i_post_func(gpointer options); void action_cyclewindows_startup(void) { - action_register_i("NextWindow", setup_forward_func, free_func, run_func); - action_register_i("PreviousWindow", setup_backward_func, free_func, - run_func); + action_register_i("NextWindow", OB_ACTION_DEFAULT_FILTER_ALL, + setup_forward_func, free_func, run_func); + action_register_i("PreviousWindow", OB_ACTION_DEFAULT_FILTER_ALL, + setup_backward_func, free_func, run_func); } static gpointer setup_func(GHashTable *config, diff --git a/openbox/actions/debug.c b/openbox/actions/debug.c index 6f729205..c575a022 100644 --- a/openbox/actions/debug.c +++ b/openbox/actions/debug.c @@ -12,7 +12,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_debug_startup(void) { - action_register("Debug", setup_func, free_func, run_func); + action_register("Debug", OB_ACTION_DEFAULT_FILTER_EMPTY, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/decorations.c b/openbox/actions/decorations.c index dd80122a..c75ca11b 100644 --- a/openbox/actions/decorations.c +++ b/openbox/actions/decorations.c @@ -7,9 +7,12 @@ static gboolean run_func_toggle(ObActionData *data, gpointer options); void action_decorations_startup(void) { - action_register("Decorate", NULL, NULL, run_func_on); - action_register("Undecorate", NULL, NULL, run_func_off); - action_register("ToggleDecorations", NULL, NULL, run_func_toggle); + action_register("Decorate", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_on); + action_register("Undecorate", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_off); + action_register("ToggleDecorations", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_toggle); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index 8980630b..3f926e64 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -54,8 +54,10 @@ static void i_post_func(gpointer options); void action_desktop_startup(void) { - action_register_i("GoToDesktop", setup_go_func, free_func, run_func); - action_register_i("SendToDesktop", setup_send_func, free_func, run_func); + action_register_i("GoToDesktop", OB_ACTION_DEFAULT_FILTER_EMPTY, + setup_go_func, free_func, run_func); + action_register_i("SendToDesktop", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_send_func, free_func, run_func); } static gpointer setup_func(GHashTable *config, diff --git a/openbox/actions/directionalwindows.c b/openbox/actions/directionalwindows.c index b7f9e3d1..102594d1 100644 --- a/openbox/actions/directionalwindows.c +++ b/openbox/actions/directionalwindows.c @@ -44,10 +44,10 @@ static void end_cycle(gboolean cancel, guint state, Options *o); void action_directionalwindows_startup(void) { - action_register_i("DirectionalCycleWindows", setup_cycle_func, free_func, - run_func); - action_register("DirectionalTargetWindow", setup_target_func, free_func, - run_func); + action_register_i("DirectionalCycleWindows", OB_ACTION_DEFAULT_FILTER_ALL, + setup_cycle_func, free_func, run_func); + action_register("DirectionalTargetWindow", OB_ACTION_DEFAULT_FILTER_ALL, + setup_target_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/dock.c b/openbox/actions/dock.c index 730e61cc..b20dd7e5 100644 --- a/openbox/actions/dock.c +++ b/openbox/actions/dock.c @@ -8,8 +8,10 @@ static gboolean lower_func(ObActionData *data, gpointer options); void action_dock_startup(void) { - action_register("RaiseDock", NULL, NULL, raise_func); - action_register("LowerDock", NULL, NULL, lower_func); + action_register("RaiseDock", OB_ACTION_DEFAULT_FILTER_EMPTY, + NULL, NULL, raise_func); + action_register("LowerDock", OB_ACTION_DEFAULT_FILTER_EMPTY, + NULL, NULL, lower_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/dockautohide.c b/openbox/actions/dockautohide.c index 2ade0278..163cd948 100644 --- a/openbox/actions/dockautohide.c +++ b/openbox/actions/dockautohide.c @@ -6,7 +6,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_dockautohide_startup(void) { - action_register("ToggleDockAutoHide", NULL, NULL, run_func); + action_register("ToggleDockAutoHide", OB_ACTION_DEFAULT_FILTER_EMPTY, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index 64945a1a..43463d52 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -32,7 +32,8 @@ static GSList *prompt_opts = NULL; void action_execute_startup(void) { - action_register("Execute", setup_func, free_func, run_func); + action_register("Execute", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); action_set_shutdown("Execute", shutdown_func); client_add_destroy_notify(client_dest, NULL); diff --git a/openbox/actions/exit.c b/openbox/actions/exit.c index 25d410e7..8c9636b1 100644 --- a/openbox/actions/exit.c +++ b/openbox/actions/exit.c @@ -15,7 +15,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_exit_startup(void) { - action_register("Exit", setup_func, free_func, run_func); + action_register("Exit", OB_ACTION_DEFAULT_FILTER_EMPTY, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/focus.c b/openbox/actions/focus.c index 01d367c4..ebf55c8d 100644 --- a/openbox/actions/focus.c +++ b/openbox/actions/focus.c @@ -16,7 +16,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_focus_startup(void) { - action_register("Focus", setup_func, free_func, run_func); + action_register("Focus", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/focustobottom.c b/openbox/actions/focustobottom.c index 17d635af..4e0af5e1 100644 --- a/openbox/actions/focustobottom.c +++ b/openbox/actions/focustobottom.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_focustobottom_startup(void) { - action_register("FocusToBottom", NULL, NULL, run_func); + action_register("FocusToBottom", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/fullscreen.c b/openbox/actions/fullscreen.c index 9072c8c2..f87a1d89 100644 --- a/openbox/actions/fullscreen.c +++ b/openbox/actions/fullscreen.c @@ -5,7 +5,8 @@ static gboolean run_func_toggle(ObActionData *data, gpointer options); void action_fullscreen_startup(void) { - action_register("ToggleFullscreen", NULL, NULL, run_func_toggle); + action_register("ToggleFullscreen", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_toggle); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/growtoedge.c b/openbox/actions/growtoedge.c index c43e33e6..8ddc2cad 100644 --- a/openbox/actions/growtoedge.c +++ b/openbox/actions/growtoedge.c @@ -18,8 +18,10 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_growtoedge_startup(void) { - action_register("GrowToEdge", setup_func, free_func, run_func); - action_register("ShrinkToEdge", setup_shrink_func, free_func, run_func); + action_register("GrowToEdge", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); + action_register("ShrinkToEdge", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_shrink_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/iconify.c b/openbox/actions/iconify.c index 7179a788..9b467200 100644 --- a/openbox/actions/iconify.c +++ b/openbox/actions/iconify.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_iconify_startup(void) { - action_register("Iconify", NULL, NULL, run_func); + action_register("Iconify", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/kill.c b/openbox/actions/kill.c index d0b31a15..925f02f9 100644 --- a/openbox/actions/kill.c +++ b/openbox/actions/kill.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_kill_startup(void) { - action_register("Kill", NULL, NULL, run_func); + action_register("Kill", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/layer.c b/openbox/actions/layer.c index ff183205..21e7b4cc 100644 --- a/openbox/actions/layer.c +++ b/openbox/actions/layer.c @@ -15,12 +15,12 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_layer_startup(void) { - action_register("ToggleAlwaysOnTop", setup_func_top, free_func, - run_func); - action_register("ToggleAlwaysOnBottom", setup_func_bottom, free_func, - run_func); - action_register("SendToLayer", setup_func_send, free_func, - run_func); + action_register("ToggleAlwaysOnTop", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func_top, free_func, run_func); + action_register("ToggleAlwaysOnBottom", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func_bottom, free_func, run_func); + action_register("SendToLayer", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func_send, free_func, run_func); } static gpointer setup_func_top(GHashTable *config) diff --git a/openbox/actions/lower.c b/openbox/actions/lower.c index b08e6d91..b468cb29 100644 --- a/openbox/actions/lower.c +++ b/openbox/actions/lower.c @@ -6,7 +6,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_lower_startup(void) { - action_register("Lower", NULL, NULL, run_func); + action_register("Lower", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/maximize.c b/openbox/actions/maximize.c index 4854492f..b2f95872 100644 --- a/openbox/actions/maximize.c +++ b/openbox/actions/maximize.c @@ -21,9 +21,12 @@ static gboolean run_func_toggle(ObActionData *data, gpointer options); void action_maximize_startup(void) { - action_register("Maximize", setup_func, free_func, run_func_on); - action_register("Unmaximize", setup_func, free_func, run_func_off); - action_register("ToggleMaximize", setup_func, free_func, run_func_toggle); + action_register("Maximize", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func_on); + action_register("Unmaximize", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func_off); + action_register("ToggleMaximize", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func_toggle); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/move.c b/openbox/actions/move.c index 14778caf..4707de35 100644 --- a/openbox/actions/move.c +++ b/openbox/actions/move.c @@ -6,7 +6,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_move_startup(void) { - action_register("Move", NULL, NULL, run_func); + action_register("Move", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/moverelative.c b/openbox/actions/moverelative.c index 059a5cf5..e1125abd 100644 --- a/openbox/actions/moverelative.c +++ b/openbox/actions/moverelative.c @@ -18,7 +18,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_moverelative_startup(void) { - action_register("MoveRelative", setup_func, free_func, run_func); + action_register("MoveRelative", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index c443a7a3..af3202dc 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -28,7 +28,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_moveresizeto_startup(void) { - action_register("MoveResizeTo", setup_func, free_func, run_func); + action_register("MoveResizeTo", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/movetoedge.c b/openbox/actions/movetoedge.c index 809c54ed..cd99d1b8 100644 --- a/openbox/actions/movetoedge.c +++ b/openbox/actions/movetoedge.c @@ -16,7 +16,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_movetoedge_startup(void) { - action_register("MoveToEdge", setup_func, free_func, run_func); + action_register("MoveToEdge", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/omnipresent.c b/openbox/actions/omnipresent.c index 042e3bd0..3121fac3 100644 --- a/openbox/actions/omnipresent.c +++ b/openbox/actions/omnipresent.c @@ -6,7 +6,8 @@ static gboolean run_func_toggle(ObActionData *data, gpointer options); void action_omnipresent_startup(void) { - action_register("ToggleOmnipresent", NULL, NULL, run_func_toggle); + action_register("ToggleOmnipresent", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_toggle); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/raise.c b/openbox/actions/raise.c index 272b3da6..283b07be 100644 --- a/openbox/actions/raise.c +++ b/openbox/actions/raise.c @@ -6,7 +6,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_raise_startup(void) { - action_register("Raise", NULL, NULL, run_func); + action_register("Raise", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/raiselower.c b/openbox/actions/raiselower.c index 2e7fbc33..9231b608 100644 --- a/openbox/actions/raiselower.c +++ b/openbox/actions/raiselower.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_raiselower_startup(void) { - action_register("RaiseLower", NULL, NULL, run_func); + action_register("RaiseLower", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/reconfigure.c b/openbox/actions/reconfigure.c index 22f104e3..66f4a80b 100644 --- a/openbox/actions/reconfigure.c +++ b/openbox/actions/reconfigure.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_reconfigure_startup(void) { - action_register("Reconfigure", NULL, NULL, run_func); + action_register("Reconfigure", OB_ACTION_DEFAULT_FILTER_EMPTY, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/resize.c b/openbox/actions/resize.c index b6b9487e..b193864f 100644 --- a/openbox/actions/resize.c +++ b/openbox/actions/resize.c @@ -19,7 +19,8 @@ static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch, void action_resize_startup(void) { - action_register("Resize", setup_func, free_func, run_func); + action_register("Resize", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/resizerelative.c b/openbox/actions/resizerelative.c index e957e6ef..50741fa0 100644 --- a/openbox/actions/resizerelative.c +++ b/openbox/actions/resizerelative.c @@ -22,7 +22,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_resizerelative_startup(void) { - action_register("ResizeRelative", setup_func, free_func, run_func); + action_register("ResizeRelative", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/restart.c b/openbox/actions/restart.c index 94b5934d..33369211 100644 --- a/openbox/actions/restart.c +++ b/openbox/actions/restart.c @@ -13,7 +13,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_restart_startup(void) { - action_register("Restart", setup_func, free_func, run_func); + action_register("Restart", OB_ACTION_DEFAULT_FILTER_EMPTY, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/shade.c b/openbox/actions/shade.c index 5e8da07b..6e1b61a5 100644 --- a/openbox/actions/shade.c +++ b/openbox/actions/shade.c @@ -7,9 +7,12 @@ static gboolean run_func_toggle(ObActionData *data, gpointer options); void action_shade_startup(void) { - action_register("Shade", NULL, NULL, run_func_on); - action_register("Unshade", NULL, NULL, run_func_off); - action_register("ToggleShade", NULL, NULL, run_func_toggle); + action_register("Shade", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_on); + action_register("Unshade", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_off); + action_register("ToggleShade", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func_toggle); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/showdesktop.c b/openbox/actions/showdesktop.c index 99ca1058..647fa648 100644 --- a/openbox/actions/showdesktop.c +++ b/openbox/actions/showdesktop.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_showdesktop_startup(void) { - action_register("ToggleShowDesktop", NULL, NULL, run_func); + action_register("ToggleShowDesktop", OB_ACTION_DEFAULT_FILTER_EMPTY, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ diff --git a/openbox/actions/showmenu.c b/openbox/actions/showmenu.c index 99aab19f..ca1464c8 100644 --- a/openbox/actions/showmenu.c +++ b/openbox/actions/showmenu.c @@ -13,7 +13,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_showmenu_startup(void) { - action_register("ShowMenu", setup_func, free_func, run_func); + action_register("ShowMenu", OB_ACTION_DEFAULT_FILTER_SINGLE, + setup_func, free_func, run_func); } static gpointer setup_func(GHashTable *config) diff --git a/openbox/actions/unfocus.c b/openbox/actions/unfocus.c index b1e3335d..26c1b3cd 100644 --- a/openbox/actions/unfocus.c +++ b/openbox/actions/unfocus.c @@ -5,7 +5,8 @@ static gboolean run_func(ObActionData *data, gpointer options); void action_unfocus_startup(void) { - action_register("Unfocus", NULL, NULL, run_func); + action_register("Unfocus", OB_ACTION_DEFAULT_FILTER_SINGLE, + NULL, NULL, run_func); } /* Always return FALSE because its not interactive */ -- 2.34.1