all repos — openbox @ 8af51d8a1be9c3cb9d89d1d8378de72f42599760

openbox fork - make it a bit more like ryudo

add role matching to per app settings and fix a small memleak in the code that frees the per app list
Mikael Magnusson mikachu@comhem.se
commit

8af51d8a1be9c3cb9d89d1d8378de72f42599760

parent

4a42260849ab284cc6a257c3d0cb74b4633a39de

3 files changed, 10 insertions(+), 3 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -215,8 +215,8 @@ ObAppSettings *app = (ObAppSettings *) a->data;

if (!strcmp(app->name, client->name)) { ob_debug("Window matching: %s\n", app->name); - - return app; + if (!app->role || !strcmp(app->role, client->role)) + return app; } a = a->next;
M openbox/client.hopenbox/client.h

@@ -273,6 +273,7 @@

struct _ObAppSettings { gchar *name; + gchar *role; gboolean decor; gboolean shade; gboolean focus;
M openbox/config.copenbox/config.c

@@ -124,6 +124,8 @@ if (parse_attr_string("name", app, &name)) {

xmlNodePtr n, c; ObAppSettings *settings = g_new0(ObAppSettings, 1); settings->name = name; + if (!parse_attr_string("role", app, &settings->role)) + settings->role = NULL; settings->decor = TRUE; if ((n = parse_find_node("decor", app->children)))

@@ -755,7 +757,11 @@ for (it = config_menu_files; it; it = g_slist_next(it))

g_free(it->data); g_slist_free(config_menu_files); - for (it = config_per_app_settings; it; it = g_slist_next(it)) + for (it = config_per_app_settings; it; it = g_slist_next(it)) { + ObAppSettings *itd = (ObAppSettings *)it->data; + g_free(itd->name); + g_free(itd->role); g_free(it->data); + } g_slist_free(config_per_app_settings); }