openbox/actions/unfocus.c \
openbox/filters/_all.c \
openbox/filters/_all.h \
+ openbox/filters/all.c \
+ openbox/filters/target.c \
openbox/action.c \
openbox/action.h \
openbox/action_filter.c \
void filters__all_startup(void)
{
- /*filter_foo_startup();*/
+ filter_all_startup();
+ filter_target_startup();
}
void filters__all_startup(void);
-/*void filter_foo_startup(void);*/
+void filter_all_startup(void);
+void filter_target_startup(void);
--- /dev/null
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+ filters/all.c for the Openbox window manager
+ Copyright (c) 2011 Dana Jansens
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ See the COPYING file for a copy of the GNU General Public License.
+*/
+
+#include "openbox/action_filter.h"
+
+static gboolean reduce(struct _ObClient *c, gpointer data)
+{
+ return FALSE; /* remove nothing */
+}
+static gboolean expand(struct _ObClient *c, gpointer data)
+{
+ return TRUE; /* add everything */
+}
+
+void filter_all_startup(void)
+{
+ action_filter_register("all", NULL, NULL, reduce, expand);
+}
--- /dev/null
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+ filters/all.c for the Openbox window manager
+ Copyright (c) 2011 Dana Jansens
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ See the COPYING file for a copy of the GNU General Public License.
+*/
+
+#include "openbox/action_filter.h"
+#include "openbox/event.h"
+
+static gboolean reduce(struct _ObClient *c, gpointer data)
+{
+ return c != event_current_target(); /* remove anything not the target */
+}
+static gboolean expand(struct _ObClient *c, gpointer data)
+{
+ return c == event_current_target(); /* add only the target */
+}
+
+void filter_target_startup(void)
+{
+ action_filter_register("target", NULL, NULL, reduce, expand);
+}