[nautilus/wip/csoriano/destktop-split2: 4/14] desktop-window: avoid wrong size



commit cf79068dc70c87e963e217e2e8ae149ee5ed1872
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Mar 16 14:22:13 2016 +0100

    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/nautilus-desktop-window.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index cd52182..2ef0ef8 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -168,6 +168,11 @@ nautilus_desktop_window_constructed (GObject *obj)
 
        G_OBJECT_CLASS (nautilus_desktop_window_parent_class)->constructed (obj);
 
+       /* We don't want to set a default size, which the parent does, since this
+        * will cause the desktop window to behave wrong. Bug 763749.
+        */
+       gtk_window_set_default_size (GTK_WINDOW (window), -1, -1);
+
        /* Initialize the desktop link monitor singleton */
        nautilus_desktop_link_monitor_get ();
 


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