[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 1412cf3: Fix a few issues with latest GTK scaling
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-26 1412cf3: Fix a few issues with latest GTK scaling changes |
Date: |
Wed, 24 Jan 2018 14:10:48 -0500 (EST) |
branch: emacs-26
commit 1412cf3edd65103649cd7318c39ee4adeea43416
Author: Robert Pluim <address@hidden>
Commit: Martin Rudalics <address@hidden>
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.
---
src/xfns.c | 4 ++--
src/xterm.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/xfns.c b/src/xfns.c
index 4ea5113..20fe61b 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;
diff --git a/src/xterm.c b/src/xterm.c
index f05ac61..364a8a8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 1412cf3: Fix a few issues with latest GTK scaling changes,
Martin Rudalics <=