[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making TTY menus more visual
From: |
Eli Zaretskii |
Subject: |
Re: Making TTY menus more visual |
Date: |
Thu, 15 Oct 2020 16:34:39 +0300 |
> Date: Tue, 13 Oct 2020 18:59:01 -0700
> From: Jared Finder <jared@finder.org>
> Cc: emacs-devel@gnu.org
>
> > Are you sure posn-window cannot return a frame? For example, on a
> > TTY, I get this:
> >
> > (posn-at-x-y 0 0 (selected-frame))
> > => (#<frame F1 069b0190> nil (0 . 0) 0)
> >
> > And (0,0) are coordinates in the frame's menu bar.
>
> A ha! A bug! Behavior is different depending on options selected at
> configure time.
>
> Behavior with ./configure --with-x=no:
> (posn-at-x-y 0 0 (selected-frame))
> => (nil nil (0 . 0) 0)
> (selected-frame)
> => #<frame F1 0x55be32685d38>
>
> Behavior with ./configure --with-x=yes:
> (posn-at-x-y 0 0 (selected-frame))
> => (#<frame F1 0x561fedbc6b98> nil (0 . 0) 0)
> (selected-frame)
> => #<frame F1 0x561fedbc6b98>
>
> This bug has been around a while, on Debian (Emacs 26.1), emacs-no-x vs
> emacs-gtk shows the same difference in behavior.
Right.
> Do you have a preference for a fix? Some options:
> [...]
> I found at one other behavior difference, if you pass in out of bounds
> coordinates (example: 1000 0 for a TTY), --with-x=no you get the value
> as if you passed in 0 0, but --with-x=yes assumes the coordinate is
> valid. There are probably other differences. I can do a pass over this
> function, I'd like to know the razor to use.
These all are due to the same problem: too early exclusion of code in
builds --without-x. I think I fixed this on the emacs-27 branch.
(While at that, I also fixed the documentation by adding the
description of the POSITION in this case.)
I don't think it's right to change the meaning of the WINDOW part of a
click even at this point: the current behavior is very old, and the
fact it's called WINDOW doesn't mean it cannot be a frame in some
cases, assuming we document that.
> > Does it make sense to install this patch on its own? If so, we can
> > install it without waiting for the legal paperwork, the changes are
> > small enough.
>
> Yes, the issue existed prior to my changes when using TMM in a terminal.
OK, I will install that soon. Thanks.
- Re: Making TTY menus more visual, (continued)
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/08
- Re: Making TTY menus more visual, Jared Finder, 2020/10/09
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/09
- Re: Making TTY menus more visual, Jared Finder, 2020/10/10
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/10
- Re: Making TTY menus more visual, Jared Finder, 2020/10/11
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/12
- Re: Making TTY menus more visual, Jared Finder, 2020/10/12
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/13
- Re: Making TTY menus more visual, Jared Finder, 2020/10/13
- Re: Making TTY menus more visual,
Eli Zaretskii <=
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/16
- Re: Making TTY menus more visual, Jared Finder, 2020/10/16
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/24
- Re: Making TTY menus more visual, Jared Finder, 2020/10/24
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/31
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/24
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/04
- Re: Making TTY menus more visual, Eli Zaretskii, 2020/10/04
- Re: Making TTY menus more visual, Jared Finder, 2020/10/04