]> icculus.org git repositories - dana/openbox.git/blob - openbox/filters/target.c
Use ObConfigValue to parse gravity coords, remove parse special functions from config...
[dana/openbox.git] / openbox / filters / target.c
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    filters/all.c for the Openbox window manager
4    Copyright (c) 2011             Dana Jansens
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    See the COPYING file for a copy of the GNU General Public License.
17 */
18
19 #include "openbox/action_filter.h"
20 #include "openbox/action_list_run.h"
21 #include "openbox/client_set.h"
22
23 static ObClientSet* filter(gboolean invert, const ObActionListRun *data,
24                            gpointer setup_data)
25 {
26     ObClientSet *set = client_set_single(data->target);
27     if (invert) set = client_set_minus(client_set_all(), set);
28     return set;
29 }
30
31 void filter_target_startup(void)
32 {
33     action_filter_register("target", NULL, NULL, filter);
34 }