Use ObClientSet objects in the filter system, so filters work on these sets.
authorDana Jansens <danakj@orodu.net>
Fri, 29 Jul 2011 20:01:11 +0000 (16:01 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:55:14 +0000 (18:55 -0400)
openbox/action_filter.c
openbox/action_filter.h

index 7451e257a0d916ae39168949bd80f3aeeaeec34b..bdd0f6a38d33f8e9eb56be3a193820a522d2702c 100644 (file)
@@ -141,16 +141,14 @@ void action_filter_unref(ObActionFilter *f)
     }
 }
 
-void action_filter_expand(ObActionFilter *f, GHashTable *client_set)
+void action_filter_expand(ObActionFilter *f, struct _ObClientSet *set)
 {
     g_return_if_fail(f != NULL);
-    g_return_if_fail(client_set != NULL);
-    return f->def->expand(client_set);
+    return f->def->expand(set);
 }
 
-void action_filter_reduce(ObActionFilter *f, GHashTable *client_set)
+void action_filter_reduce(ObActionFilter *f, struct _ObClientSet *set)
 {
     g_return_if_fail(f != NULL);
-    g_return_if_fail(client_set != NULL);
-    return f->def->reduce(client_set);
+    return f->def->reduce(set);
 }
index ff2e99a4a2a144e1038a7214afe53d8de344713f..31184b0339a00cadd0d71f145931e0f53e3f69e3 100644 (file)
@@ -20,6 +20,7 @@
 
 struct _ObActionValue;
 struct _ObClient;
+struct _ObClientSet;
 
 typedef struct _ObActionFilter ObActionFilter;
 typedef struct _ObActionFilterFuncs ObActionFilterFuncs;
@@ -30,11 +31,11 @@ typedef void (*ObActionFilterDestroyFunc)(gpointer data);
 /*! Runs the filter and modifies the client set as appropriate.  This function
   is given a set of clients and may simply remove clients that do not
   match its criteria. */
-typedef void (*ObActionFilterReduceFunc)(GHashTable *client_set);
+typedef void (*ObActionFilterReduceFunc)(struct _ObClientSet *set);
 /*! Runs the filter and creates a new client set as appropriate.  This function
   is given a set of clients and must add all unlisted clients possible that
   match its criteria. */
-typedef void (*ObActionFilterExpandFunc)(GHashTable *client_set);
+typedef void (*ObActionFilterExpandFunc)(struct _ObClientSet *set);
 
 void action_filter_startup(gboolean reconfig);
 void action_filter_shutdown(gboolean reconfig);
@@ -49,5 +50,5 @@ ObActionFilter* action_filter_new(const gchar *key, struct _ObActionValue *v);
 void action_filter_ref(ObActionFilter *f);
 void action_filter_unref(ObActionFilter *f);
 
-void action_filter_expand(ObActionFilter *f, GHashTable *client_set);
-void action_filter_reduce(ObActionFilter *f, GHashTable *client_set);
+void action_filter_expand(ObActionFilter *f, struct _ObClientSet *set);
+void action_filter_reduce(ObActionFilter *f, struct _ObClientSet *set);