diff options
author | lukefromdc <[email protected]> | 2016-03-16 16:46:23 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2016-03-16 16:46:23 -0400 |
commit | 92607629fc6b2503f28e79dcc73e3ac9ed72bffa (patch) | |
tree | a8a752075b12780588c70743eb4f3815a51a22ea | |
parent | c988bad5f4604b67e20c880ca6bef57aeed13304 (diff) | |
download | caja-92607629fc6b2503f28e79dcc73e3ac9ed72bffa.tar.bz2 caja-92607629fc6b2503f28e79dcc73e3ac9ed72bffa.tar.xz |
GTK 3.20-fix wrong desktop size right
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 https://github.com/GNOME/nautilus/commit/cf79068dc70c87e963e217e2e8ae149ee5ed1872
"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."
-rw-r--r-- | src/caja-desktop-window.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c index 4ef0b976..7e83a4b6 100644 --- a/src/caja-desktop-window.c +++ b/src/caja-desktop-window.c @@ -135,7 +135,12 @@ caja_desktop_window_new (CajaApplication *application, "height_request", height_request, "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", "Caja"); @@ -280,4 +285,3 @@ caja_desktop_window_loaded (CajaDesktopWindow *window) { return window->details->loaded; } - |