summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2015-11-02 13:26:00 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2015-11-12 09:34:52 +0100
commite257e8414c40880045d3ba5d9434ba15633b20fd (patch)
treed19f3286292027b759567dc9cbeec02902074080
parente9b9fa9424b163000de9878790c1c5bb5ec87b99 (diff)
downloadnautilus-e257e8414c40880045d3ba5d9434ba15633b20fd.tar.gz
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
m---------libgd0
-rw-r--r--src/nautilus-desktop-window.c4
2 files changed, 2 insertions, 2 deletions
diff --git a/libgd b/libgd
-Subproject ee6e1e34adbb7d8a635e369f831a412bfbe8fb8
+Subproject 04b2480259769709ec34d7ee48294878c94bbbb
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 980bd0d9e..328351023 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));