diff options
author | ZenWalker <[email protected]> | 2017-08-20 03:29:36 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-20 17:00:09 +0200 |
commit | 444cec08e38299e5d6ae9489ae74d02f4e4a5f97 (patch) | |
tree | 186b13a66e39402e816a14db612f8dd4b89ee811 /previewer | |
parent | 14e0759b76e3213334ae8be367382695f9fe8d55 (diff) | |
download | atril-444cec08e38299e5d6ae9489ae74d02f4e4a5f97.tar.bz2 atril-444cec08e38299e5d6ae9489ae74d02f4e4a5f97.tar.xz |
avoid gdk_screen_get_primary_monitor/gdk_screen_get_monitor_scale_factor
Diffstat (limited to 'previewer')
-rw-r--r-- | previewer/ev-previewer-window.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c index 2ec298bb..2571ac8d 100644 --- a/previewer/ev-previewer-window.c +++ b/previewer/ev-previewer-window.c @@ -70,11 +70,21 @@ G_DEFINE_TYPE (EvPreviewerWindow, ev_previewer_window, GTK_TYPE_WINDOW) static gdouble get_screen_dpi (EvPreviewerWindow *window) { - GdkScreen *screen; - gint monitor; + GdkScreen *screen; +#if GTK_CHECK_VERSION (3, 22, 0) + GdkMonitor *monitor; + GdkDisplay *display; +#else + gint monitor; +#endif screen = gtk_window_get_screen (GTK_WINDOW (window)); +#if GTK_CHECK_VERSION (3, 22, 0) + display = gdk_screen_get_display (screen); + monitor = gdk_display_get_primary_monitor (display); +#else monitor = gdk_screen_get_primary_monitor (screen); +#endif return ev_document_misc_get_screen_dpi (screen, monitor); } |