From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>
Cc: 23568@debbugs.gnu.org
Subject: bug#23568: 25.0.94; Mode line menus appear incorrectly in some monitor configurations
Date: Sun, 04 Jun 2017 17:28:48 +0300 [thread overview]
Message-ID: <834lvvbzdr.fsf@gnu.org> (raw)
In-Reply-To: <87poekev55.fsf@gmail.com> (message from Alex on Sat, 03 Jun 2017 13:19:50 -0600)
> From: Alex <agrambot@gmail.com>
> Cc: rudalics@gmx.at, 23568@debbugs.gnu.org
> Date: Sat, 03 Jun 2017 13:19:50 -0600
>
> > If this is supposed to be used as part of mode-line display, then no.
> > Signaling errors in the middle of redisplay is generally a bad idea,
> > because they cause another redisplay cycle, which again signals an
> > error, and Emacs just freezes.
>
> I see. In the general case, is it recommended to silently fallback to a
> different method, or should there be a log message?
>
> I changed the procedure so that it only uses the coordinates if they're
> numbers.
It depends. For Lisp code that we write, it is indeed better to avoid
the problem altogether. For user-defined Lisp, about which we can
make no assumptions, there should be a log message in case of errors.
> >> +(defun display-monitor-attribute (attribute &optional display x y)
> >> + "Return the value of the ATTRIBUTE of the current monitor.
> >
> > The doc string should say something about what "the current monitor"
> > means, or have a link to where that is explained.
>
> I expanded that section, copying a chunk of it from
> `frame-monitor-attributes'.
>
> >> +DISPLAY can be a display name, a terminal name, or a frame.
> >
> > "Terminal name" or "terminal object"?
>
> `display-monitor-attributes' can take both, which is where I copied that
> line from.
>
> I don't think I should have done that, actually. I don't believe this
> function makes sense for a terminal/display input, as a
> terminal/display, as I understand it, can have multiple physical
> monitors.
>
> I changed all instances of `display' to `frame'. I'm still not sure on
> the name, though. Perhaps a better prefix would be `physical-monitor-*',
> or just `monitor-*'?
>
> What do you think?
LGTM, thanks.
> > Why is this in xmenu.c? Is the problem unique to X window system?
>
> The xmenu.c part contains the actual bugfix, while the frame.el part is
> just a partial abstraction for the fix so that other procedures can use
> it (such as compute_tip_xy in xfns.c).
>
> The procedure I'm editing (menu_position_func) is inside an #ifdef
> USE_GTK, and uses x_display_pixel_{height,width} currently. I'm not sure
> if it's useful outside of X currently.
>
> I haven't tested the issue on other systems, but I don't think it's an
> issue in Windows as half of the code came from Windows code according to
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22549#61.
Ah, okay. Then maybe just add a comment there saying that the w32
case is handled elsewhere, perhaps with a pointer to the function
which does that.
> Here's an updated diff:
Thanks, it would be nice if you could also provide a ChangeLog-style
commit log message. That'd make the job of pushing the changes much
easier.
next prev parent reply other threads:[~2017-06-04 14:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 20:44 bug#23568: 25.0.94; Mode line menus appear incorrectly in some monitor configurations Alex
2016-05-18 21:28 ` Alex
2017-05-28 7:09 ` Alex
2017-05-31 7:14 ` Alex
2017-05-31 9:26 ` martin rudalics
2017-05-31 21:18 ` Alex
2017-06-01 5:39 ` martin rudalics
2017-06-01 20:33 ` Alex
2017-06-01 20:51 ` Alex
2017-06-02 6:10 ` martin rudalics
2017-06-02 7:18 ` Alex
2017-06-02 9:00 ` martin rudalics
2017-06-03 0:54 ` Alex
2017-06-03 6:32 ` Eli Zaretskii
2017-06-03 19:19 ` Alex
2017-06-04 14:28 ` Eli Zaretskii [this message]
2017-06-05 8:03 ` Alex
2017-06-05 15:36 ` Eli Zaretskii
2017-06-05 19:33 ` martin rudalics
2017-06-10 9:30 ` Eli Zaretskii
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=834lvvbzdr.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=23568@debbugs.gnu.org \
--cc=agrambot@gmail.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.