unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
@ 2024-09-05 16:35 Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-09-07  9:45 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-09-05 16:35 UTC (permalink / raw)
  To: 73050

This is only a minor issue. After enabling `tab-bar-mode' when hovering
with the mouse over the `tab-bar-separator' space, an empty tool tip
will be shown after a short delay.

To reproduce:

1. Start emacs -Q
2. M-x tab-bar-mode
3. Move the mouse pointer over the space right after the "*scratch*" tab

Would it make sense to somehow prevent displaying blank tool tips, e.g.,
via the following advice? Or maybe blank tool tips could be prevented on
the tab-bar level?

(defun x-show-tip-adv (str &rest _) (string-blank-p str))
(advice-add #'x-show-tip :before-until #'x-show-tip-adv)

Thank you!

In GNU Emacs 30.0.90 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.0, Xaw scroll bars) of 2024-09-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --prefix=... --with-tree-sitter
 --with-native-compilation --with-x-toolkit=athena --with-dbus
 --without-selinux --without-threads --without-gsettings --without-gpm
 --with-cairo --with-cairo-xcb'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBXML2
MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
SQLITE3 TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XPM LUCID
ZLIB





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-05 16:35 bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-09-07  9:45 ` Eli Zaretskii
  2024-09-08  6:51   ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-09-07  9:45 UTC (permalink / raw)
  To: Daniel Mendler, Juri Linkov; +Cc: 73050

> Date: Thu, 05 Sep 2024 18:35:14 +0200
> From:  Daniel Mendler via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> This is only a minor issue. After enabling `tab-bar-mode' when hovering
> with the mouse over the `tab-bar-separator' space, an empty tool tip
> will be shown after a short delay.
> 
> To reproduce:
> 
> 1. Start emacs -Q
> 2. M-x tab-bar-mode
> 3. Move the mouse pointer over the space right after the "*scratch*" tab
> 
> Would it make sense to somehow prevent displaying blank tool tips, e.g.,
> via the following advice? Or maybe blank tool tips could be prevented on
> the tab-bar level?
> 
> (defun x-show-tip-adv (str &rest _) (string-blank-p str))
> (advice-add #'x-show-tip :before-until #'x-show-tip-adv)

Juri, can we prevent such empty tooltips from being shown by tab bar?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-07  9:45 ` Eli Zaretskii
@ 2024-09-08  6:51   ` Juri Linkov
  2024-09-08  7:06     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2024-09-08  6:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Daniel Mendler, 73050

>> This is only a minor issue. After enabling `tab-bar-mode' when hovering
>> with the mouse over the `tab-bar-separator' space, an empty tool tip
>> will be shown after a short delay.
>>
>> To reproduce:
>>
>> 1. Start emacs -Q
>> 2. M-x tab-bar-mode
>> 3. Move the mouse pointer over the space right after the "*scratch*" tab
>>
>> Would it make sense to somehow prevent displaying blank tool tips, e.g.,
>> via the following advice? Or maybe blank tool tips could be prevented on
>> the tab-bar level?
>>
>> (defun x-show-tip-adv (str &rest _) (string-blank-p str))
>> (advice-add #'x-show-tip :before-until #'x-show-tip-adv)
>
> Juri, can we prevent such empty tooltips from being shown by tab bar?

Maybe this unasked-for default fallback is not needed after all:

diff --git a/src/xdisp.c b/src/xdisp.c
index f9a10267bad..18834c6b781 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15155,8 +15155,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
   help_echo_object = help_echo_window = Qnil;
   help_echo_pos = -1;
   help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_HELP);
-  if (NILP (help_echo_string))
-    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_CAPTION);
 }
 
 #endif /* HAVE_WINDOW_SYSTEM */





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-08  6:51   ` Juri Linkov
@ 2024-09-08  7:06     ` Eli Zaretskii
  2024-09-08 16:40       ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-09-08  7:06 UTC (permalink / raw)
  To: Juri Linkov; +Cc: mail, 73050

> From: Juri Linkov <juri@linkov.net>
> Cc: Daniel Mendler <mail@daniel-mendler.de>,  73050@debbugs.gnu.org
> Date: Sun, 08 Sep 2024 09:51:41 +0300
> 
> >> This is only a minor issue. After enabling `tab-bar-mode' when hovering
> >> with the mouse over the `tab-bar-separator' space, an empty tool tip
> >> will be shown after a short delay.
> >>
> >> To reproduce:
> >>
> >> 1. Start emacs -Q
> >> 2. M-x tab-bar-mode
> >> 3. Move the mouse pointer over the space right after the "*scratch*" tab
> >>
> >> Would it make sense to somehow prevent displaying blank tool tips, e.g.,
> >> via the following advice? Or maybe blank tool tips could be prevented on
> >> the tab-bar level?
> >>
> >> (defun x-show-tip-adv (str &rest _) (string-blank-p str))
> >> (advice-add #'x-show-tip :before-until #'x-show-tip-adv)
> >
> > Juri, can we prevent such empty tooltips from being shown by tab bar?
> 
> Maybe this unasked-for default fallback is not needed after all:
> 
> diff --git a/src/xdisp.c b/src/xdisp.c
> index f9a10267bad..18834c6b781 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -15155,8 +15155,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
>    help_echo_object = help_echo_window = Qnil;
>    help_echo_pos = -1;
>    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_HELP);
> -  if (NILP (help_echo_string))
> -    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_CAPTION);
>  }
>  
>  #endif /* HAVE_WINDOW_SYSTEM */

Do you remember why was this introduced?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-08  7:06     ` Eli Zaretskii
@ 2024-09-08 16:40       ` Juri Linkov
  2024-09-08 17:49         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2024-09-08 16:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mail, 73050

>> >> This is only a minor issue. After enabling `tab-bar-mode' when hovering
>> >> with the mouse over the `tab-bar-separator' space, an empty tool tip
>> >> will be shown after a short delay.
>> >>
>> >> To reproduce:
>> >>
>> >> 1. Start emacs -Q
>> >> 2. M-x tab-bar-mode
>> >> 3. Move the mouse pointer over the space right after the "*scratch*" tab
>> >>
>> >> Would it make sense to somehow prevent displaying blank tool tips, e.g.,
>> >> via the following advice? Or maybe blank tool tips could be prevented on
>> >> the tab-bar level?
>> >>
>> >> (defun x-show-tip-adv (str &rest _) (string-blank-p str))
>> >> (advice-add #'x-show-tip :before-until #'x-show-tip-adv)
>> >
>> > Juri, can we prevent such empty tooltips from being shown by tab bar?
>>
>> Maybe this unasked-for default fallback is not needed after all:
>>
>> diff --git a/src/xdisp.c b/src/xdisp.c
>> index f9a10267bad..18834c6b781 100644
>> --- a/src/xdisp.c
>> +++ b/src/xdisp.c
>> @@ -15155,8 +15155,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
>>    help_echo_object = help_echo_window = Qnil;
>>    help_echo_pos = -1;
>>    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_HELP);
>> -  if (NILP (help_echo_string))
>> -    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_CAPTION);
>>  }
>>
>>  #endif /* HAVE_WINDOW_SYSTEM */
>
> Do you remember why was this introduced?

It was copy-pasted from tool-bar code.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-08 16:40       ` Juri Linkov
@ 2024-09-08 17:49         ` Eli Zaretskii
  2024-09-09 17:17           ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-09-08 17:49 UTC (permalink / raw)
  To: Juri Linkov; +Cc: mail, 73050

> From: Juri Linkov <juri@linkov.net>
> Cc: mail@daniel-mendler.de,  73050@debbugs.gnu.org
> Date: Sun, 08 Sep 2024 19:40:18 +0300
> 
> >> Maybe this unasked-for default fallback is not needed after all:
> >>
> >> diff --git a/src/xdisp.c b/src/xdisp.c
> >> index f9a10267bad..18834c6b781 100644
> >> --- a/src/xdisp.c
> >> +++ b/src/xdisp.c
> >> @@ -15155,8 +15155,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
> >>    help_echo_object = help_echo_window = Qnil;
> >>    help_echo_pos = -1;
> >>    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_HELP);
> >> -  if (NILP (help_echo_string))
> >> -    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_CAPTION);
> >>  }
> >>
> >>  #endif /* HAVE_WINDOW_SYSTEM */
> >
> > Do you remember why was this introduced?
> 
> It was copy-pasted from tool-bar code.

But on the tool bar there are no empty space between buttons.  On the
tab bar, there is.  What I don't understand is why those empty spaces
have tooltips.  Because each tab-bar button has a valid, non-nil
tooltip, so the problem is with the tooltips popped up when the mouse
is between buttons.  Do you understand why this happens?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-08 17:49         ` Eli Zaretskii
@ 2024-09-09 17:17           ` Juri Linkov
  2024-09-09 17:44             ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2024-09-09 17:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mail, 73050

>> >> Maybe this unasked-for default fallback is not needed after all:
>> >>
>> >> diff --git a/src/xdisp.c b/src/xdisp.c
>> >> index f9a10267bad..18834c6b781 100644
>> >> --- a/src/xdisp.c
>> >> +++ b/src/xdisp.c
>> >> @@ -15155,8 +15155,6 @@ note_tab_bar_highlight (struct frame *f, int x, int y)
>> >>    help_echo_object = help_echo_window = Qnil;
>> >>    help_echo_pos = -1;
>> >>    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_HELP);
>> >> -  if (NILP (help_echo_string))
>> >> -    help_echo_string = AREF (f->tab_bar_items, prop_idx + TAB_BAR_ITEM_CAPTION);
>> >>  }
>> >>
>> >>  #endif /* HAVE_WINDOW_SYSTEM */
>> >
>> > Do you remember why was this introduced?
>> 
>> It was copy-pasted from tool-bar code.
>
> But on the tool bar there are no empty space between buttons.  On the
> tab bar, there is.  What I don't understand is why those empty spaces
> have tooltips.  Because each tab-bar button has a valid, non-nil
> tooltip, so the problem is with the tooltips popped up when the mouse
> is between buttons.  Do you understand why this happens?

When there is no TAB_BAR_ITEM_HELP, then it falls back to TAB_BAR_ITEM_CAPTION.
But the tab bar doesn't need tooltips on spaces.  So this patch is needed.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-09 17:17           ` Juri Linkov
@ 2024-09-09 17:44             ` Eli Zaretskii
  2024-09-09 18:33               ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-09-09 17:44 UTC (permalink / raw)
  To: Juri Linkov; +Cc: mail, 73050

> From: Juri Linkov <juri@linkov.net>
> Cc: mail@daniel-mendler.de,  73050@debbugs.gnu.org
> Date: Mon, 09 Sep 2024 20:17:03 +0300
> 
> > But on the tool bar there are no empty space between buttons.  On the
> > tab bar, there is.  What I don't understand is why those empty spaces
> > have tooltips.  Because each tab-bar button has a valid, non-nil
> > tooltip, so the problem is with the tooltips popped up when the mouse
> > is between buttons.  Do you understand why this happens?
> 
> When there is no TAB_BAR_ITEM_HELP, then it falls back to TAB_BAR_ITEM_CAPTION.
> But the tab bar doesn't need tooltips on spaces.  So this patch is needed.

Fine, then let's install it, and thanks.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator
  2024-09-09 17:44             ` Eli Zaretskii
@ 2024-09-09 18:33               ` Juri Linkov
  0 siblings, 0 replies; 9+ messages in thread
From: Juri Linkov @ 2024-09-09 18:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mail, 73050

close 73050 30.0.60
thanks

>> > But on the tool bar there are no empty space between buttons.  On the
>> > tab bar, there is.  What I don't understand is why those empty spaces
>> > have tooltips.  Because each tab-bar button has a valid, non-nil
>> > tooltip, so the problem is with the tooltips popped up when the mouse
>> > is between buttons.  Do you understand why this happens?
>> 
>> When there is no TAB_BAR_ITEM_HELP, then it falls back to TAB_BAR_ITEM_CAPTION.
>> But the tab bar doesn't need tooltips on spaces.  So this patch is needed.
>
> Fine, then let's install it, and thanks.

So now installed on master.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-09-09 18:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 16:35 bug#73050: 30.0.90; Empty tool tip when hovering over tab-bar separator Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-07  9:45 ` Eli Zaretskii
2024-09-08  6:51   ` Juri Linkov
2024-09-08  7:06     ` Eli Zaretskii
2024-09-08 16:40       ` Juri Linkov
2024-09-08 17:49         ` Eli Zaretskii
2024-09-09 17:17           ` Juri Linkov
2024-09-09 17:44             ` Eli Zaretskii
2024-09-09 18:33               ` Juri Linkov

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).