]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
Fix for #3715, app settings applied too late.
[chaz/openbox] / openbox / client.c
index d6321949a1dee2a0f1c2912c604d269550c2d295..016a660fd486b9875b27714813cbc6db6dd0e959 100644 (file)
@@ -247,7 +247,7 @@ void client_manage(Window window, ObPrompt *prompt)
     gboolean transient = FALSE;
     Rect place, *monitor;
     Time launch_time, map_time;
-    gint user_time;
+    guint32 user_time;
 
     grab_server(TRUE);
 
@@ -315,6 +315,11 @@ void client_manage(Window window, ObPrompt *prompt)
     ob_debug("Window group: 0x%x\n", self->group?self->group->leader:0);
     ob_debug("Window name: %s class: %s\n", self->name, self->class);
 
+    /* per-app settings override stuff from client_get_all, and return the
+       settings for other uses too. the returned settings is a shallow copy,
+       that needs to be freed with g_free(). */
+    settings = client_get_settings_state(self);
+
     /* now we have all of the window's information so we can set this up.
        do this before creating the frame, so it can tell that we are still
        mapping and doesn't go applying things right away */
@@ -335,10 +340,6 @@ void client_manage(Window window, ObPrompt *prompt)
        time now */
     grab_server(FALSE);
 
-    /* per-app settings override stuff from client_get_all, and return the
-       settings for other uses too. the returned settings is a shallow copy,
-       that needs to be freed with g_free(). */
-    settings = client_get_settings_state(self);
     /* the session should get the last say though */
     client_restore_session_state(self);
 
@@ -3904,12 +3905,15 @@ static void client_present(ObClient *self, gboolean here, gboolean raise,
     client_focus(self);
 }
 
-/* this function exists to map to the client_activate message in the ewmh,
-   the user arg is unused because nobody uses it correctly anyway. */
+/* this function exists to map to the net_active_window message in the ewmh */
 void client_activate(ObClient *self, gboolean here, gboolean raise,
                      gboolean unshade, gboolean user)
 {
-    client_present(self, here, raise, unshade);
+    if (user || (self->desktop == DESKTOP_ALL ||
+                 self->desktop == screen_desktop))
+        client_present(self, here, raise, unshade);
+    else
+        client_hilite(self, TRUE);
 }
 
 static void client_bring_windows_recursive(ObClient *self,
This page took 0.023264 seconds and 4 git commands to generate.