unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 51246@debbugs.gnu.org
Subject: bug#51246: 29.0.50; New tab button on tab bar doesn't respond to button up events
Date: Sun, 17 Oct 2021 14:53:05 +0800	[thread overview]
Message-ID: <875ytwcfce.fsf@yahoo.com> (raw)
In-Reply-To: <837decgoop.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Oct 2021 09:17:42 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> In master and emacs-28, clicking "new tab" results in a new tab being
>> created immediately when the mouse button is pressed, without waiting
>> for it to be released.  This behaviour is very annoying!

> Please explain why it's annoying, and why you cannot solve your
> annoyance by rebinding the relevant commands to the mouse gestures
> which you find less annoying.

It's annoying because there is absolutely no feedback between when the
mouse clicks down on the button, and when the new tab is created, much
less an opportunity for the user to cancel the action.

For instance, it is easy to accidentally click the "new tab" button when
selecting "Open File" in the toolbar on GTK+ builds.  When this happens
in 27.2, the user can simply move the mouse outside the button before
releasing the mouse button, which cancels the action.  (This is also
consistent with every other X-Windows application.)  However, in Emacs
28, the user will have to find the new tab that was inadvertently
created and close it, which takes longer and is surprising, because it
is inconsistent with all other X-Windows applications.

Rebinding the "new tab" command to tab-bar mouse-1 (instead of
down-mouse-1, which is what it seems to be right now) would certainly be
possible, but I don't understand how the tab bar code works: when I run
describe-key and click the "+" button, I'm told tab-bar mouse-1 is bound
to `tab-bar-close-tab-from-button', and tab-bar down-mouse-1 is bound to
`tab-bar-mouse-select-tab', neither of which make much sense, because
the "+" button creates a new tab, not select or close an existing one.

Could someone explain exactly which command runs when the "+" button is
clicked, and how to bind it to mouse-1, instead of down-mouse-1?

Either way, the old behaviour should be the default; it would be nice to
have it restored, and I'd be happy to help with restoring it if
possible.

Thanks.





  reply	other threads:[~2021-10-17  6:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87pms4cplg.fsf.ref@yahoo.com>
2021-10-17  3:11 ` bug#51246: 29.0.50; New tab button on tab bar doesn't respond to button up events Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-17  6:17   ` Eli Zaretskii
2021-10-17  6:53     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-10-17 17:27       ` Juri Linkov

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=875ytwcfce.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=51246@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.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).