From: Brian Zwahr <echosa@echosa.net>
To: Robert Pluim <rpluim@gmail.com>, martin rudalics <rudalics@gmx.at>
Cc: 31880@debbugs.gnu.org
Subject: bug#31880: 26.1; VC mode line popup when clicked is off screen
Date: Wed, 20 Jun 2018 15:15:03 -0500 [thread overview]
Message-ID: <f1ffdc6c699796f426e2d62118427917e7611144.camel@echosa.net> (raw)
In-Reply-To: <87vaad4ji3.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2784 bytes --]
I'm not exactly sure what to do with this. I assume I need to get the
latest source and build it, after applying this diff? Where do I get
the source? I've never built Emacs from source before. I'll try to get
to it when I can.
On Wed, 2018-06-20 at 16:31 +0200, Robert Pluim wrote:
> martin rudalics <rudalics@gmx.at> writes:
> It should, but it doesnʼt. I see similar problems here, but I
> donʼtunderstand why (unless this is another instance of "Mixing X and
> GTKcalls will bite your arse eventually").
> What happens when you move a frame to the bottom of your screen
> andopen a menu bar entry? Does it also get hidden?
> No, menu bar menus are fine.
> GTK tooltips seem to appear in the right place, so Iʼll look
> forinspiration there.
> It's up to GTK to decide whether a menu fits on the screen so maybe
> itmesses up the height of menu bar text when scaling is in
> effect. Doesscaling affect the height of menus in the first
> place? Does it affectthe height of tooltips?
>
> Yes and yes, because it affects the size of the font used to
> displaythem.
> Thanks for looking into this, martin
> Yet another instance of a disagreement between how GTK and X
> calculatepixels. Who will rid me of this turbulent mix?
> Brian, would it be possible for you to try out the following patch?
> Itfixes things for me here.
> diff --git i/src/xmenu.c w/src/xmenu.cindex e7ef31ac56..3a245771e1
> 100644--- i/src/xmenu.c+++ w/src/xmenu.c@@ -1162,11 +1162,16 @@
> menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean
> *push_in, gpointer GtkRequisition req; int max_x = -1; int
> max_y = -1;+ int scale = 1; Lisp_Object frame,
> workarea; XSETFRAME (frame, data->f); +#ifdef HAVE_GTK3+ scale =
> xg_get_scale (data->f);+#endif+ /* TODO: Get the monitor workarea
> directly without calculating other items in x-display-monitor-
> attributes-list. */ workarea = call3 (Qframe_monitor_workarea,@@
> -1192,11 +1197,18 @@ menu_position_func (GtkMenu *menu, gint *x, gint
> *y, gboolean *push_in, gpointer max_y = x_display_pixel_height
> (dpyinfo); } + /* frame-monitor-workarea and
> {x,y}_display_pixel_width/height all+ return device pixels, but
> GTK wants scaled pixels. The positions+ passed in via data were
> already scaled for us. */+ max_x /= scale;+ max_y /= scale; *x =
> data->x; *y = data->y; /* Check if there is room for the
> menu. If not, adjust x/y so that- the menu is fully
> visible. */+ the menu is fully
> visible. gtk_widget_get_preferred_size returns+ scaled pixels,
> so there is no need to apply the
> scaling+ factor. */ gtk_widget_get_preferred_size (GTK_WIDGET
> (menu), NULL, &req); if (data->x + req.width > max_x) *x -=
> data->x + req.width - max_x;
>
>
>
[-- Attachment #2: Type: text/html, Size: 4473 bytes --]
next prev parent reply other threads:[~2018-06-20 20:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:59 bug#31880: 26.1; VC mode line popup when clicked is off screen Brian Zwahr
2018-06-19 7:17 ` martin rudalics
[not found] ` <380133793885a54af49bbc8715cfea4ced525342.camel@echosa.net>
2018-06-20 7:42 ` martin rudalics
2018-06-20 9:52 ` Robert Pluim
2018-06-20 11:55 ` martin rudalics
2018-06-20 14:31 ` Robert Pluim
2018-06-20 20:15 ` Brian Zwahr [this message]
2018-06-21 8:08 ` Robert Pluim
2018-06-21 14:41 ` Brian Zwahr
2018-06-21 15:05 ` Robert Pluim
2018-06-21 15:39 ` Eli Zaretskii
2018-06-22 8:04 ` Robert Pluim
2018-06-22 8:56 ` martin rudalics
2018-06-21 7:15 ` martin rudalics
2018-06-21 8:31 ` Robert Pluim
2018-06-21 8:56 ` martin rudalics
2018-06-25 10:33 ` João Távora
2018-06-27 7:33 ` martin rudalics
2018-06-27 8:24 ` João Távora
2018-06-27 9:56 ` Robert Pluim
2018-06-27 11:16 ` João Távora
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=f1ffdc6c699796f426e2d62118427917e7611144.camel@echosa.net \
--to=echosa@echosa.net \
--cc=31880@debbugs.gnu.org \
--cc=rpluim@gmail.com \
--cc=rudalics@gmx.at \
/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.