]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
Redraw the focus cycle popup when the list of focusable windows changes, rather than...
[chaz/openbox] / openbox / client.c
index fcbe7cd97a6484be58a9e4c2cbfe80c45370e6d4..ae87ff0b2af697d7b338f294b20135ad17d24f1b 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);
@@ -303,6 +304,7 @@ void client_manage(Window window, ObPrompt *prompt)
     self->obwin.type = Window_Client;
     self->window = window;
     self->prompt = prompt;
+    self->managed = TRUE;
 
     /* non-zero defaults */
     self->wmstate = WithdrawnState; /* make sure it gets updated first time */
@@ -632,6 +634,8 @@ void client_unmanage(ObClient *self)
 
     mouse_grab_for_client(self, FALSE);
 
+    self->managed = FALSE;
+
     /* remove the window from our save set, unless we are managing an internal
        ObPrompt window */
     if (!self->prompt)
@@ -1159,6 +1163,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 +2372,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.024101 seconds and 4 git commands to generate.