summaryrefslogtreecommitdiff
path: root/libdocument/ev-document-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdocument/ev-document-misc.c')
-rw-r--r--libdocument/ev-document-misc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index 529c5b97..88935c73 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -24,6 +24,7 @@
#include <math.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
#include "ev-document-misc.h"
@@ -401,13 +402,9 @@ ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor)
#endif
{
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 (sc_width, sc_height);
+ dp = hypot (WidthOfScreen (gdk_x11_screen_get_xscreen (screen)), HeightOfScreen (gdk_x11_screen_get_xscreen (screen)));
/*diagonal in inches*/
#if GTK_CHECK_VERSION (3, 22, 0)