From 3d4e551f3481558680a57351c6abed8321578cbd Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 24 Jan 2018 17:02:50 +0100 Subject: [PATCH] Only check for scaling on GTK3 * src/xfns.c (Fx_display_monitor_attributes_list): Only check for scaling on GTK3 --- src/xfns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index 4ea5113265..3dbd669edc 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4940,7 +4940,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */) gint width_mm = -1, height_mm = -1; GdkRectangle rec, work; struct MonitorInfo *mi = &monitors[i]; - int scale; + int scale = 1; #if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor *monitor = gdk_display_get_monitor (gdpy, i); @@ -4989,7 +4989,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */) /* GTK returns scaled sizes for the workareas. */ #if GTK_CHECK_VERSION (3, 22, 0) scale = gdk_monitor_get_scale_factor (monitor); -#else +#elif defined HAVE_GTK3 scale = gdk_screen_get_monitor_scale_factor (gscreen, i); #endif rec.width *= scale; -- 2.16.0.rc1