GNU bug report logs - #58289
context-menu-mode on multi-head hidpi display

Previous Next

Package: emacs;

Reported by: Ethan Ongstad <eongstad <at> icloud.com>

Date: Tue, 4 Oct 2022 11:06:03 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Ethan Ongstad <eongstad <at> icloud.com>
Cc: 58289 <at> debbugs.gnu.org
Subject: bug#58289: context-menu-mode on multi-head hidpi display
Date: Wed, 05 Oct 2022 08:24:45 +0800
Ethan Ongstad <eongstad <at> icloud.com> writes:

> Setup: two 4k 27" displays, left vertical, right horizontal. Using gnome
> 42.4 on X11 with 200% upscaling.
>
> Bug:
> 1. emacs -Q
> 2. M-x context-menu-mode
> 3. Go full screen on right display
> 4. right click anywhere on left half of right display
>
> Outcome: the context menu will only popup on the very most left edge of the
> right display. 
>
> Doesn't occur when 100% scaled, when using the left monitor,
> or when clicking on the right half of the right display.

Please tell me whether or not this patch resolves the problem:

diff --git a/src/xmenu.c b/src/xmenu.c
index 1452b3c6d1..f972186154 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1430,7 +1430,11 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer
      items in x-display-monitor-attributes-list. */
   workarea = call3 (Qframe_monitor_workarea,
                     Qnil,
-                    make_fixnum (data->x),
+#ifdef HAVE_GTK3
+                    make_fixnum (data->x * scale),
+                    make_fixnum (data->y * scale)
+#else
+		    make_fixnum (data->x),
                     make_fixnum (data->y));
 
   if (CONSP (workarea))




This bug report was last modified 2 years and 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.