]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
add role matching to per app settings and fix a small memleak in the code that frees...
[chaz/openbox] / openbox / client.c
index ce1c417fd0f8f73303f4b243de8cb8c93123901b..cfcc7da22c4241e28d31835717509dd907fba3de 100644 (file)
@@ -206,17 +206,17 @@ void client_manage_all()
 
 /* This should possibly do something more interesting than just match
  * against WM_CLASS literally. */
-static ObAppSetting *get_settings(ObClient *client)
+static ObAppSettings *get_settings(ObClient *client)
 {
     GSList *a = config_per_app_settings;
 
     while (a) {
-        ObAppSetting *app = (ObAppSetting *) a->data;
+        ObAppSettings *app = (ObAppSettings *) a->data;
         
         if (!strcmp(app->name, client->name)) {
             ob_debug("Window matching: %s\n", app->name);
-
-            return (ObAppSetting *) a->data;
+            if (!app->role || !strcmp(app->role, client->role))
+                return app;
         }
 
         a = a->next;
@@ -232,7 +232,7 @@ void client_manage(Window window)
     XSetWindowAttributes attrib_set;
     XWMHints *wmhint;
     gboolean activate = FALSE;
-    ObAppSetting *settings;
+    ObAppSettings *settings;
 
     grab_server(TRUE);
 
This page took 0.021248 seconds and 4 git commands to generate.