all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ethan Ongstad <eongstad@icloud.com>
Cc: 58289@debbugs.gnu.org
Subject: bug#58289: context-menu-mode on multi-head hidpi display
Date: Wed, 05 Oct 2022 08:24:45 +0800	[thread overview]
Message-ID: <87pmf7w20i.fsf@yahoo.com> (raw)
In-Reply-To: <9362A1D3-9135-40DC-99A1-3A9B898ADCAF@icloud.com> (Ethan Ongstad's message of "Tue, 4 Oct 2022 09:25:23 -0700")

Ethan Ongstad <eongstad@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))





      reply	other threads:[~2022-10-05  0:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04  1:26 bug#58289: context-menu-mode on multi-head hidpi display Ethan Ongstad via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 13:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 16:25   ` Ethan Ongstad via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05  0:24     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmf7w20i.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58289@debbugs.gnu.org \
    --cc=eongstad@icloud.com \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.