Skip to content

Commit f54b243

Browse files
committed
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.
1 parent b46c75b commit f54b243

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/xfns.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5089,6 +5089,8 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
50895089
#elif defined HAVE_GTK3
50905090
scale = gdk_screen_get_monitor_scale_factor (gscreen, i);
50915091
#endif
5092+
rec.x *= scale;
5093+
rec.y *= scale;
50925094
rec.width *= scale;
50935095
rec.height *= scale;
50945096
work.x *= scale;

0 commit comments

Comments
 (0)