From d9fffe2dc0e33d6777099c18635b7b75f54d3d35 Mon Sep 17 00:00:00 2001 From: ZenWalker Date: Sat, 19 Aug 2017 01:40:38 +0200 Subject: avoid deprecated gdk_screen_get_width/height --- libdocument/ev-document-misc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libdocument') diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c index fc47a9ee..e59eb354 100644 --- a/libdocument/ev-document-misc.c +++ b/libdocument/ev-document-misc.c @@ -375,9 +375,13 @@ gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor) { gdouble dp, di; + gint sc_width, sc_height; + + gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, + &sc_width, &sc_height); /*diagonal in pixels*/ - dp = hypot (gdk_screen_get_width (screen), gdk_screen_get_height (screen)); + dp = hypot (sc_width, sc_height); /*diagonal in inches*/ di = hypot (gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm (screen)) / 25.4; -- cgit v1.2.1