From ae88b2dec8c0a2a53bf3eae1b1d64b264dee7b77 Mon Sep 17 00:00:00 2001
From: lukefromdc <lukefromdc@hushmail.com>
Date: Wed, 16 Mar 2016 17:13:05 -0400
Subject: [PATCH] GTK 3.20-fix wrong desktop size
Reset default size of desktop window to -1 in GTK 3.19/20 only. The combination of a non-resizable
window with a default size is what causes the desktop to open wrong size.
based on GNOME/nautilus@cf79068
"desktop-window: avoid wrong size"
"gtk+ recently changed and unresizable windows now take into account
the default size set. We set the default size for normal resizable
windows in nautilus."
"However the desktop window is a no resizable window. What happens now
when setting a default size is that that size is used instead of the
widget request size, since window sizing now takes precedence over
widget sizing."
"To fix it, set the default size to -1 to override what the nautilus
window does by default, so we can avoid this misbehaviour."
---
src/nemo-desktop-window.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/nemo-desktop-window.c b/src/nemo-desktop-window.c
index ce5984b..7ce3e0c 100644
--- a/src/nemo-desktop-window.c
+++ b/src/nemo-desktop-window.c
@@ -171,6 +171,13 @@ nemo_desktop_window_new (GdkScreen *scre
"screen", screen,
NULL);
+ /* Stop wrong desktop window size in GTK 3.20*/
+ /* We don't want to set a default size, which the parent does, since this */
+ /* will cause the desktop window to open at the wrong size in gtk 3.20 */
+#if GTK_CHECK_VERSION (3, 19, 0)
+ gtk_window_set_default_size (GTK_WINDOW (window), -1, -1);
+#endif
+
/* Special sawmill setting*/
gtk_window_set_wmclass (GTK_WINDOW (window), "desktop_window", "Nemo");
--
2.5.0