[nautilus] desktop: avoid to raise the window on the stack



commit 34ac46969b3c1c889eab0782d45e85fa3fb5e505
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Sep 10 20:13:14 2015 +0200

    desktop: avoid to raise the window on the stack
    
    If we don't pass DONT_MAKE_ACTIVE flag to the window, it will
    raise the window with a gtk_present_window () call, which will
    actually hide the desktop window from the background.
    
    This fixes the icons not appearing until the next map () of the
    desktop window, that lowers again the window on the stack.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754360

 src/nautilus-desktop-window.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index bde4622..980bd0d 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -58,8 +58,13 @@ nautilus_desktop_window_update_directory (NautilusDesktopWindow *window)
 
        window->details->loaded = FALSE;
        location = g_file_new_for_uri (EEL_DESKTOP_URI);
+        /* We use NAUTILUS_WINDOW_OPEN_FLAG_DONT_MAKE_ACTIVE so the nautilus-window
+         * doesn't call gtk_window_present () which raises the window on the stack
+         * and actually hides it from the background */
         nautilus_application_open_location_full (NAUTILUS_APPLICATION (g_application_get_default ()),
-                                                 location, 0, NULL, NAUTILUS_WINDOW (window), NULL);
+                                                 location,
+                                                 NAUTILUS_WINDOW_OPEN_FLAG_DONT_MAKE_ACTIVE,
+                                                 NULL, NAUTILUS_WINDOW (window), NULL);
        window->details->loaded = TRUE;
 
        g_object_unref (location);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]