aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Pluim2020-01-07 14:41:52 +0100
committerRobert Pluim2020-01-07 17:26:21 +0100
commitf54b24304decc52defbf12576993d746e02a80ee (patch)
treef5fff9c354c7c83d6d5b14c96ec473d1cbc5f021
parentb46c75b16cb870584c0e00eb81c85715c5421d20 (diff)
downloademacs-f54b24304decc52defbf12576993d746e02a80ee.tar.gz
emacs-f54b24304decc52defbf12576993d746e02a80ee.zip
Scale top-left coordinates in display-monitor-attributes-list
When using multiple monitors, and HiDPI, the top-left coordinates of the monitors need to be adjusted, not just the width and height (Bug#31223). * xfns.c (Fx_display_monitor_attributes_list): Scale top-left coordinates.
-rw-r--r--src/xfns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index d0d5d399dc4..276ea1c3935 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5089,6 +5089,8 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
5089#elif defined HAVE_GTK3 5089#elif defined HAVE_GTK3
5090 scale = gdk_screen_get_monitor_scale_factor (gscreen, i); 5090 scale = gdk_screen_get_monitor_scale_factor (gscreen, i);
5091#endif 5091#endif
5092 rec.x *= scale;
5093 rec.y *= scale;
5092 rec.width *= scale; 5094 rec.width *= scale;
5093 rec.height *= scale; 5095 rec.height *= scale;
5094 work.x *= scale; 5096 work.x *= scale;