Commit 1412cf3e authored by Robert Pluim's avatar Robert Pluim Committed by Martin Rudalics

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.
parent 59db8dca
......@@ -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;
......
......@@ -10310,7 +10310,9 @@ void
x_set_offset (struct frame *f, register int xoff, register int yoff, int change_gravity)
{
int modified_top, modified_left;
#ifdef USE_GTK
int scale = xg_get_scale (f);
#endif
if (change_gravity > 0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment