summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorRobert Pluim <rpluim@gmail.com>2018-01-24 20:08:35 +0100
committerMartin Rudalics <rudalics@gmx.at>2018-01-24 20:08:35 +0100
commit1412cf3edd65103649cd7318c39ee4adeea43416 (patch)
treeb1fd585861ea6eaf363ddfebfbea3b64119ee53f /src/xfns.c
parent59db8dca030ba6a34d143c3cc6715f02beba1068 (diff)
downloademacs-1412cf3edd65103649cd7318c39ee4adeea43416.tar.gz
Fix a few issues with latest GTK scaling changes
* src/xfns.c (Fx_display_monitor_attributes_list): Call gdk_screen_get_monitor_scale_factor only for GTK versions 3.10..3.21. * src/xterm.c (x_set_offset): Call xg_get_scale for GTK only.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 4ea5113265b..20fe61bffd8 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 GTK_CHECK_VERSION (3, 10, 0)
scale = gdk_screen_get_monitor_scale_factor (gscreen, i);
#endif
rec.width *= scale;