]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
Set hints that remember the WM_WINDOW_ROLE and WM_CLASS properties for our users.
[chaz/openbox] / openbox / client.c
index fcbe7cd97a6484be58a9e4c2cbfe80c45370e6d4..e3a7d6ecd2ef7bf25dd363ee4106c74abbf57827 100644 (file)
@@ -76,6 +76,7 @@ static RrImage *client_default_icon     = NULL;
 static void client_get_all(ObClient *self, gboolean real);
 static void client_get_startup_id(ObClient *self);
 static void client_get_session_ids(ObClient *self);
+static void client_save_session_ids(ObClient *self);
 static void client_get_area(ObClient *self);
 static void client_get_desktop(ObClient *self);
 static void client_get_state(ObClient *self);
@@ -1159,6 +1160,7 @@ static void client_get_all(ObClient *self, gboolean real)
     /* get the session related properties, these can change decorations
        from per-app settings */
     client_get_session_ids(self);
+    client_save_session_ids(self);
 
     /* now we got everything that can affect the decorations */
     if (!real)
@@ -2367,6 +2369,15 @@ static void client_get_session_ids(ObClient *self)
     }
 }
 
+/*! Save the session IDs as seen by Openbox when the window mapped, so that
+  users can still access them later if the app changes them */
+static void client_save_session_ids(ObClient *self)
+{
+    PROP_SETS(self->window, ob_role, self->role);
+    PROP_SETS(self->window, ob_name, self->name);
+    PROP_SETS(self->window, ob_class, self->class);
+}
+
 static void client_change_wm_state(ObClient *self)
 {
     gulong state[2];
This page took 0.020933 seconds and 4 git commands to generate.