From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 73838@debbugs.gnu.org
Subject: bug#73838: 31.0.50; Problems in note_mouse_highlight if -nw
Date: Wed, 16 Oct 2024 18:38:05 +0300 [thread overview]
Message-ID: <86r08goy76.fsf@gnu.org> (raw)
In-Reply-To: <m2iktsruye.fsf@gmail.com> (message from Gerd Möllmann on Wed, 16 Oct 2024 16:19:53 +0200)
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Wed, 16 Oct 2024 16:19:53 +0200
>
> I'd like to propose a change like in the attached patch (from my tty
> child frames branch). It fixes the case I mentioned above.
I'd like to understand why these changes are needed. Could you please
elaborate on each and every change?
> if (EQ (window, f->menu_bar_window))
> {
> - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
Can a TTY frame have a menu-bar window? AFAIK, a menu bar is just a
frame glyph row on TTY frames, it is not a window.
> if (EQ (window, f->tab_bar_window))
> {
> note_tab_bar_highlight (f, x, y);
> - if (tab_bar__dragging_in_progress)
> - cursor = FRAME_OUTPUT_DATA (f)->hand_cursor;
> - else
> - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + if (FRAME_WINDOW_P (f))
> + {
> + if (tab_bar__dragging_in_progress)
> + cursor = FRAME_OUTPUT_DATA (f)->hand_cursor;
> + else
> + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + }
Same question here about tab-bar window.
> if (EQ (window, f->tool_bar_window))
> {
> note_tool_bar_highlight (f, x, y);
> - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> goto set_cursor;
Same question here about tool-bar window.
> #ifdef HAVE_WINDOW_SYSTEM
> if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
> {
> - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
This part I could understand.
> #ifdef HAVE_WINDOW_SYSTEM
> if (part == ON_VERTICAL_BORDER)
> {
> - cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor;
Do we have vertical borders on TTY frames? If yes, this is also
understood.
> else if (part == ON_RIGHT_DIVIDER)
> {
> - cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor;
> help_echo_string = build_string ("drag-mouse-1: resize");
> goto set_cursor;
Do we have right dividers on TTY frames?
> @@ -36244,7 +36253,8 @@ note_mouse_highlight (struct frame *f, int x, int y)
> || minibuf_level
> || NILP (Vresize_mini_windows))
> {
> - cursor = FRAME_OUTPUT_DATA (f)->vertical_drag_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->vertical_drag_cursor;
> help_echo_string = build_string ("drag-mouse-1: resize");
Same question about bottom dividers as above about right dividers.
> else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)
> {
> - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
How can fringes happen on a TTY frame?
> else if (part == ON_VERTICAL_SCROLL_BAR
> || part == ON_HORIZONTAL_SCROLL_BAR)
> - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> - else
> + {
> + if (FRAME_WINDOW_P (f))
> + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
> + }
> + else if (FRAME_WINDOW_P (f))
> cursor = FRAME_OUTPUT_DATA (f)->text_cursor;
> #endif
How can scroll bars happen on TTY frames?
next prev parent reply other threads:[~2024-10-16 15:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 10:47 bug#73838: 31.0.50; Problems in note_mouse_highlight if -nw Gerd Möllmann
2024-10-16 14:19 ` Gerd Möllmann
2024-10-16 15:38 ` Eli Zaretskii [this message]
2024-10-16 16:56 ` Gerd Möllmann
2024-10-16 18:30 ` Eli Zaretskii
2024-10-16 19:03 ` Gerd Möllmann
2024-10-17 4:06 ` Eli Zaretskii
2024-10-17 5:07 ` Gerd Möllmann
2024-10-17 5:48 ` Eli Zaretskii
2024-10-17 7:03 ` Gerd Möllmann
2024-10-17 10:44 ` Eli Zaretskii
2024-10-17 12:12 ` Gerd Möllmann
2024-10-17 10:46 ` Eli Zaretskii
2024-10-17 12:39 ` Gerd Möllmann
2024-10-19 3:50 ` Gerd Möllmann
2024-10-19 8:00 ` Gerd Möllmann
2024-10-16 15:27 ` Eli Zaretskii
2024-10-16 16:41 ` Gerd Möllmann
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r08goy76.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73838@debbugs.gnu.org \
--cc=gerd.moellmann@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).