1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00

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.
This commit is contained in:
Robert Pluim 2018-01-24 20:08:35 +01:00 committed by Martin Rudalics
parent 59db8dca03
commit 1412cf3edd
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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)
{