summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorTobias Bading <tbading@web.de>2019-11-27 16:51:26 +0100
committerRobert Pluim <rpluim@gmail.com>2019-12-03 08:54:31 +0100
commita05bafffdcb88df74408a8402cafc9829407c1e5 (patch)
tree4ba2d741290b27517de1619e4f70dc7c1ac88e3b /src/xfns.c
parent16ce6dbef279bda70b4d60b4d2d0aff008bfa5f7 (diff)
downloademacs-a05bafffdcb88df74408a8402cafc9829407c1e5.tar.gz
Fix incorrect GTK menus on HiDPI monitors with scaling factor > 1
This should fix Bug#31223, Bug#28106, Bug#23672 as well as Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/emacs25/+bug/1695228 Also fixes the formerly unscaled Y value returned by frame-monitor-workarea (and display-monitor-attributes-list). For details on why some GTK menus were empty please see thread https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg01061.html * src/gtkutil.c (menubar_map_cb, xg_update_frame_menubar): Scale up req.height so that the menu bar's height is in device pixels as expected. (xg_event_is_for_menubar): Scale down rec.x and rec.y so that gtk_widget_intersect() works as intended. * src/xfns.c (Fx_display_monitor_attributes_list): Scale work.x and work.y up to be in device pixels. Copyright-paperwork-exempt: yes
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index b1b40702c24..47aa19607f6 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5093,6 +5093,8 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
#endif
rec.width *= scale;
rec.height *= scale;
+ work.x *= scale;
+ work.y *= scale;
work.width *= scale;
work.height *= scale;