diff options
author | ZenWalker <[email protected]> | 2017-08-07 02:56:30 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2017-08-12 22:16:28 -0400 |
commit | 17b3c0ca924ffcd4bd06fded98227eba626d4f0b (patch) | |
tree | 089be8a53def688e8dea11c48b00c16a34111d7f /src/caja-window.c | |
parent | 6c51a333e80df22587df4d9e0e2789fd1289d728 (diff) | |
download | caja-17b3c0ca924ffcd4bd06fded98227eba626d4f0b.tar.bz2 caja-17b3c0ca924ffcd4bd06fded98227eba626d4f0b.tar.xz |
avoid deprecated gdk_screen_get_width/height
Diffstat (limited to 'src/caja-window.c')
-rw-r--r-- | src/caja-window.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/caja-window.c b/src/caja-window.c index 84ae7487..f820a20b 100644 --- a/src/caja-window.c +++ b/src/caja-window.c @@ -516,7 +516,12 @@ caja_window_zoom_to_default (CajaWindow *window) static guint get_max_forced_height (GdkScreen *screen) { - return (gdk_screen_get_height (screen) * 90) / 100; + gint height; + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + NULL, &height); + + return (height * 90) / 100; } /* Code should never force the window wider than this size. @@ -525,7 +530,12 @@ get_max_forced_height (GdkScreen *screen) static guint get_max_forced_width (GdkScreen *screen) { - return (gdk_screen_get_width (screen) * 90) / 100; + gint width; + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &width, NULL); + + return (width * 90) / 100; } /* This must be called when construction of CajaWindow is finished, |