Actions say what kind of filter they would like by default (one window or all)
authorDana Jansens <danakj@orodu.net>
Fri, 29 Jul 2011 20:37:41 +0000 (16:37 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:55:15 +0000 (18:55 -0400)
39 files changed:
openbox/action.c
openbox/action.h
openbox/action_filter.h
openbox/actions/addremovedesktop.c
openbox/actions/breakchroot.c
openbox/actions/close.c
openbox/actions/cyclewindows.c
openbox/actions/debug.c
openbox/actions/decorations.c
openbox/actions/desktop.c
openbox/actions/directionalwindows.c
openbox/actions/dock.c
openbox/actions/dockautohide.c
openbox/actions/execute.c
openbox/actions/exit.c
openbox/actions/focus.c
openbox/actions/focustobottom.c
openbox/actions/fullscreen.c
openbox/actions/growtoedge.c
openbox/actions/iconify.c
openbox/actions/kill.c
openbox/actions/layer.c
openbox/actions/lower.c
openbox/actions/maximize.c
openbox/actions/move.c
openbox/actions/moverelative.c
openbox/actions/moveresizeto.c
openbox/actions/movetoedge.c
openbox/actions/omnipresent.c
openbox/actions/raise.c
openbox/actions/raiselower.c
openbox/actions/reconfigure.c
openbox/actions/resize.c
openbox/actions/resizerelative.c
openbox/actions/restart.c
openbox/actions/shade.c
openbox/actions/showdesktop.c
openbox/actions/showmenu.c
openbox/actions/unfocus.c

index 229a73d2af8496a39decf395d172d2759c084df1..99a28bb7957f7ce0e523dfdfa9b3edd6187d07ec 100644 (file)
@@ -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;
index 187bf590f5596fd060ab32b2b96f90faa1d3e9cd..2163154d4294d0a592427cb7165d60bb2cac6177 100644 (file)
@@ -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);
index 31184b0339a00cadd0d71f145931e0f53e3f69e3..d9bf28e13e29f2dcee1d2d17aa239961bc4410e4 100644 (file)
@@ -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);
index 85923e390b0429dd00522bd8fd87dda91324fd14..6c4593a9e1f28c1d698d8e6aeddeb2155eca8b5e 100644 (file)
@@ -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;
-}
index c46fa93018599dc85bb3536f384ff2307f5b7bc7..56e90a466f16aab7d4225a8e0a56faff3753253d 100644 (file)
@@ -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);
 }
index b8f799bd80105a3b9c80143ba51d2c502c3696d3..d3e5770ccbbb186bdd2fc59e2eb6d2670f0354eb 100644 (file)
@@ -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 */
index 5b91bf6358db2ff95ecf45c3d8eba59272f03e09..9ce5f5fec4ba4529b9bae10b5aba665f485494e5 100644 (file)
@@ -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,
index 6f72920591f0989f739a21ffa3785bcf5cd18ce3..c575a0220ea8cf3aad1a3d81be2bec6a8cf4594a 100644 (file)
@@ -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)
index dd80122a7a6bcd81893782e7448b5f6654e1f946..c75ca11b42ea43283eaba2c4fef5d615d8c8006e 100644 (file)
@@ -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 */
index 8980630bf549b41415b7f09721edb8687f0c7018..3f926e6444c909ac0a4f251b520ecd857c60877f 100644 (file)
@@ -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,
index b7f9e3d13a185da8015773088e0b6327bb3c4faf..102594d1923d8a5455272c587627d7a1ca725526 100644 (file)
@@ -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)
index 730e61cc24b740e86933a20fa835da268e3ae2dc..b20dd7e5d4fd4cb8950788b6f515396a9dd2ec9d 100644 (file)
@@ -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 */
index 2ade0278869b8b670179f853d9bca73f7e4142a8..163cd948cf0947d10e6c35d21a5e6aacc04fdc53 100644 (file)
@@ -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 */
index 64945a1aa0fcb7903fc81115985d2e4fb5dc69e5..43463d5234bc0bfbf64ccfb6c6866e4e7028067e 100644 (file)
@@ -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);
index 25d410e751b017ca372f5199a35f18f1aeb93d38..8c9636b1e4585444f6ae0cd42f8c607b1da2bc0c 100644 (file)
@@ -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)
index 01d367c47ddbad85b223ad5d65136b942961c0dc..ebf55c8dae6af30bd067b8a66be42e025ef18a72 100644 (file)
@@ -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)
index 17d635afc873a8555ce40ef2c46c369e39c270f2..4e0af5e1d7f437564423213b6ca1fd67cbbb1e53 100644 (file)
@@ -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 */
index 9072c8c255cb8438a7201ea4aa8ade69c2025bed..f87a1d89c34424c7e9d9ae499c491275d0ad6d15 100644 (file)
@@ -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 */
index c43e33e6d40ba2c9e8149a6cb201b03451fc883c..8ddc2cadf630030ae5568d3d4ca23f140e760ec0 100644 (file)
@@ -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)
index 7179a78804a48c0399318e4558c120768959d4af..9b46720000fb11533aac5cf05e2efc1f3e5e45b2 100644 (file)
@@ -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 */
index d0b31a1567313f6e16776fb0f2b9adb1c1b184c3..925f02f97d087fc011d5eb074d0bb403e530aa46 100644 (file)
@@ -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 */
index ff1832055578e302479c86f34781171afb092699..21e7b4cc9e8cb5dac3aadbe1f6efa2256d9b3f55 100644 (file)
@@ -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)
index b08e6d91741b99fe560d03d472a1c4f595c8c867..b468cb2957911bbceb57819c09cfdab4e8bf6037 100644 (file)
@@ -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 */
index 4854492f9b58c0b36385608d4edb146460c7b880..b2f958723bd057a97783d1766338bc1b9f0f3e77 100644 (file)
@@ -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)
index 14778caf7e1d514eaa27b31026516b46a9d4c5eb..4707de3581e8201fbbb5049fc924df814a3cb597 100644 (file)
@@ -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 */
index 059a5cf5a87614b983ca411fe5374bb5a2bf4e54..e1125abdc271a8777cfb91e031b79d089b6d027b 100644 (file)
@@ -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)
index c443a7a3204b10658c3359238aa896b29883a424..af3202dcd5d578126418b5cbf56bec13e2c74f97 100644 (file)
@@ -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)
index 809c54ed7d9d53bb92e0655747ebd7a716d085fa..cd99d1b86ed16dca1b70a530519ba6eb362cc616 100644 (file)
@@ -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)
index 042e3bd02506f607b3d47e3a76be32b8f2e154ac..3121fac3281fa3512d4e0a5c47642b9f6d80f6a8 100644 (file)
@@ -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 */
index 272b3da6eda0f79627ca2cfce4606f30e8186f5a..283b07bebec3e405cd53dd94efe6531037feadd9 100644 (file)
@@ -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 */
index 2e7fbc337ba4ea8e81a72dd01bf05f1bff57f098..9231b6081d4cda09f02de83c7bb6c7a795872e6c 100644 (file)
@@ -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 */
index 22f104e3e0c195462bb5049673a5591ef52cb62f..66f4a80b7429bda3881e946ad7020d513e7370ad 100644 (file)
@@ -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 */
index b6b9487ea797c895456e7c8c5652bfe6eb729a4e..b193864f59002db52057fffd4fe7ecb91f18304c 100644 (file)
@@ -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)
index e957e6efcbed048a448becb9c02ca122941231e2..50741fa00b97ecb3fdd1af4f13076c9a28606fa5 100644 (file)
@@ -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)
index 94b5934d0c5fd48c7bcbed6fcdf16e31152cb36e..33369211a567a96e9f2ef692e25fd0f06e7e602b 100644 (file)
@@ -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)
index 5e8da07b0754236c17e9449988dede5b5e51d1ec..6e1b61a5ec13c579995e9607de1a4d26a3548415 100644 (file)
@@ -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 */
index 99ca1058339f1c0f0c507f2e43daa9348629e6f9..647fa6485c5ddd0e40b46d98d5701cc0f7551f2f 100644 (file)
@@ -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 */
index 99aab19ff2160e161f3543dc5aae8c39d20a57c3..ca1464c86b79be15743974ee96def9b2c4607c2b 100644 (file)
@@ -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)
index b1e3335da5cd90f05cedd16cddb8c180c7f589d2..26c1b3cd0d69f9a3da7d32b100413552785a788c 100644 (file)
@@ -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 */