]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
a more proper fix for the client list menu trying to activate a closed client, no...
[chaz/openbox] / openbox / client.c
index d107c470854d73f27d94436b5a6da80f6c1f92d2..e80b84f182f9d06e2c62b877792db1df8c544d0a 100644 (file)
@@ -322,6 +322,9 @@ void client_manage(Window window)
     /* get and set application level settings */
     settings = get_settings(self);
 
+    stacking_add(CLIENT_AS_WINDOW(self));
+    client_restore_session_stacking(self);
+
     if (settings) {
         /* Don't worry, we won't actually both shade and undecorate the
          * window when push comes to shove. */
@@ -356,17 +359,15 @@ void client_manage(Window window)
         if (settings->fullscreen != -1)
             client_fullscreen(self, !!settings->fullscreen, TRUE);
 
-        if (settings->desktop < screen_num_desktops)
-            client_set_desktop(self, settings->desktop, FALSE);
+        if (settings->desktop < screen_num_desktops
+            || settings->desktop == DESKTOP_ALL)
+            client_set_desktop(self, settings->desktop, TRUE);
 
         if (settings->layer > -2 && settings->layer < 2)
             client_set_layer(self, settings->layer);
 
     }
 
-    stacking_add(CLIENT_AS_WINDOW(self));
-    client_restore_session_stacking(self);
-
     /* focus the new window? */
     if (ob_state() != OB_STATE_STARTING &&
         (config_focus_new || client_search_focus_parent(self)) ||
@@ -1546,11 +1547,12 @@ void client_update_title(ObClient *self)
         }
     }
 
-    /* did the title change? then reset the title_count */
-    if (old_title && 0 != strncmp(old_title, data, strlen(data)))
-        self->title_count = 1;
-
     if (config_title_number) {
+
+        /* did the title change? then reset the title_count */
+        if (old_title && 0 != strncmp(old_title, data, strlen(data)))
+            self->title_count = 1;
+
         /* look for duplicates and append a number */
         nums = 0;
         for (it = client_list; it; it = g_list_next(it))
@@ -1573,7 +1575,8 @@ void client_update_title(ObClient *self)
             g_free(data);
             data = ndata;
         }
-    }
+    } else
+        self->title_count = 1;
 
 no_number:
     PROP_SETS(self->window, net_wm_visible_name, data);
@@ -2853,9 +2856,6 @@ void client_unfocus(ObClient *self)
 
 void client_activate(ObClient *self, gboolean here)
 {
-    /* This check is for the client_list_menu trying to activate
-     * a closed client. */
-    if (!g_list_find(client_list, self)) return;
     if (client_normal(self) && screen_showing_desktop)
         screen_show_desktop(FALSE);
     if (self->iconic)
This page took 0.022987 seconds and 4 git commands to generate.