aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c8
-rw-r--r--src/xfns.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index cf5c31aa203..7e6db57c9dd 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3471,6 +3471,7 @@ menubar_map_cb (GtkWidget *w, gpointer user_data)
3471 GtkRequisition req; 3471 GtkRequisition req;
3472 struct frame *f = user_data; 3472 struct frame *f = user_data;
3473 gtk_widget_get_preferred_size (w, NULL, &req); 3473 gtk_widget_get_preferred_size (w, NULL, &req);
3474 req.height *= xg_get_scale (f);
3474 if (FRAME_MENUBAR_HEIGHT (f) != req.height) 3475 if (FRAME_MENUBAR_HEIGHT (f) != req.height)
3475 { 3476 {
3476 FRAME_MENUBAR_HEIGHT (f) = req.height; 3477 FRAME_MENUBAR_HEIGHT (f) = req.height;
@@ -3502,7 +3503,7 @@ xg_update_frame_menubar (struct frame *f)
3502 g_signal_connect (x->menubar_widget, "map", G_CALLBACK (menubar_map_cb), f); 3503 g_signal_connect (x->menubar_widget, "map", G_CALLBACK (menubar_map_cb), f);
3503 gtk_widget_show_all (x->menubar_widget); 3504 gtk_widget_show_all (x->menubar_widget);
3504 gtk_widget_get_preferred_size (x->menubar_widget, NULL, &req); 3505 gtk_widget_get_preferred_size (x->menubar_widget, NULL, &req);
3505 3506 req.height *= xg_get_scale (f);
3506 if (FRAME_MENUBAR_HEIGHT (f) != req.height) 3507 if (FRAME_MENUBAR_HEIGHT (f) != req.height)
3507 { 3508 {
3508 FRAME_MENUBAR_HEIGHT (f) = req.height; 3509 FRAME_MENUBAR_HEIGHT (f) = req.height;
@@ -3568,8 +3569,9 @@ xg_event_is_for_menubar (struct frame *f, const XEvent *event)
3568 3569
3569 list = gtk_container_get_children (GTK_CONTAINER (x->menubar_widget)); 3570 list = gtk_container_get_children (GTK_CONTAINER (x->menubar_widget));
3570 if (! list) return 0; 3571 if (! list) return 0;
3571 rec.x = event->xbutton.x; 3572 int scale = xg_get_scale (f);
3572 rec.y = event->xbutton.y; 3573 rec.x = event->xbutton.x / scale;
3574 rec.y = event->xbutton.y / scale;
3573 rec.width = 1; 3575 rec.width = 1;
3574 rec.height = 1; 3576 rec.height = 1;
3575 3577
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. */)
5093#endif 5093#endif
5094 rec.width *= scale; 5094 rec.width *= scale;
5095 rec.height *= scale; 5095 rec.height *= scale;
5096 work.x *= scale;
5097 work.y *= scale;
5096 work.width *= scale; 5098 work.width *= scale;
5097 work.height *= scale; 5099 work.height *= scale;
5098 5100