[nautilus] desktop: undecorate the window before positioning



commit e257e8414c40880045d3ba5d9434ba15633b20fd
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Mon Nov 2 13:26:00 2015 +0100

    desktop: undecorate the window before positioning
    
    Starting with gtk-+3.19, gtk+ tries to compensate for the client-side
    decorations when moving/resizing top level windows.
    
    With this, the Nautilus desktop window is misplaced because at the time
    it's positioned, gtk+ cannot determine it will be undecorated
    eventually, as both the gtk_window_set_decorated() and the type hint
    (_NET_WM_WINDOW_TYPE) are set after gtk_window_move().
    
    To avoid this, invoke the window positioning after
    gtk_window_set_decorated() so that gtk+ is aware that the window is not
    decorated and doesn't apply the offset to compensate for client-side
    decorations.
    
    Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=757471

 libgd                         |    2 +-
 src/nautilus-desktop-window.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgd b/libgd
index ee6e1e3..04b2480 160000
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit ee6e1e34adbb7d8a635e369f831a412bfbe8fb8b
+Subproject commit 04b2480259769709ec34d7ee48294878c94bbbb5
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 980bd0d..3283510 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -172,8 +172,6 @@ nautilus_desktop_window_constructed (GObject *obj)
        /* Initialize the desktop link monitor singleton */
        nautilus_desktop_link_monitor_get ();
 
-       gtk_window_move (GTK_WINDOW (window), 0, 0);
-
        /* shouldn't really be needed given our semantic type
         * of _NET_WM_TYPE_DESKTOP, but why not
         */
@@ -182,6 +180,8 @@ nautilus_desktop_window_constructed (GObject *obj)
        gtk_window_set_decorated (GTK_WINDOW (window),
                                  FALSE);
 
+       gtk_window_move (GTK_WINDOW (window), 0, 0);
+
        g_object_set_data (G_OBJECT (window), "is_desktop_window", 
                           GINT_TO_POINTER (1));
 


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