From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>, Mark Kennedy <mark.t.kennedy@gmail.com>
Cc: 51794@debbugs.gnu.org
Subject: bug#51794: 29.0.50; invalid input events generated from a mouse click for the tab bar
Date: Fri, 19 Nov 2021 10:26:52 +0100 [thread overview]
Message-ID: <be8a702e-16d8-6ba0-ee82-721b540b627c@gmx.at> (raw)
In-Reply-To: <83pmqwwrwj.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
>> bug fix #50993 is the bug. it made make_lispy_position skip setting
>> posn to the tab_bar if track_mouse is non-nil. why track_mouse is nil
>> for some frames and not for others i didn't look into.
>> thoughts/comments?
>
> Please do look into that last part, because we need to understand the
> situations in which this happens well enough to devise a solution. We
> don't want to revert that fix because it will re-introduce a larger
> problem. Specifically, why does this happen to you only under those
> customizations and not in "emacs -Q"?
>
> Martin, any suggestions?
Maybe the attached patch helps.
martin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: track-mouse.diff --]
[-- Type: text/x-patch; name="track-mouse.diff", Size: 1482 bytes --]
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index ecfb359b36..98e18a5c86 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -282,6 +282,7 @@ mouse-drag-drag
(setq window-last-row (- (window-height) 2)
window-last-col (- (window-width) 2))
(track-mouse
+ (setq track-mouse 'drag-dragging)
(while (progn
(setq event (read--potential-mouse-event)
end (event-end event)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7bac6dd07b..c94862d01b 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1615,7 +1615,7 @@ mouse-drag-track
(goto-char (nth 1 range)))
(setf (terminal-parameter nil 'mouse-drag-start) start-event)
- (setq track-mouse t)
+ (setq track-mouse 'drag-tracking)
(setq auto-hscroll-mode nil)
(set-transient-map
diff --git a/src/keyboard.c b/src/keyboard.c
index a99d14cb4c..abd9635a92 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5136,7 +5136,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
This issue should be properly handled by 'mouse-drag-track' and
friends, so the below is only a temporary workaround. */
- if (NILP (track_mouse))
+ if (NILP (track_mouse) || EQ (track_mouse, Qt))
posn = EQ (window_or_frame, f->tab_bar_window) ? Qtab_bar : Qtool_bar;
/* Kludge alert: for mouse events on the tab bar and tool bar,
keyboard.c wants the frame, not the special-purpose window
next prev parent reply other threads:[~2021-11-19 9:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 20:49 bug#51794: 29.0.50; invalid input events generated from a mouse click for the tab bar Mark Kennedy
2021-11-13 7:18 ` Eli Zaretskii
[not found] ` <CANru7VHKtNYZBwVHFEt-=25j7PGWkawdU+PWcdAPqdNaKSYP3w@mail.gmail.com>
2021-11-13 13:43 ` Eli Zaretskii
[not found] ` <CANru7VH29KdLB0-Bc-JoDB3x+_-M9irADdQ2=JVkupbLyW15DQ@mail.gmail.com>
2021-11-13 14:40 ` Eli Zaretskii
2021-11-13 14:52 ` Mark Kennedy
2021-11-13 15:29 ` Eli Zaretskii
2021-11-13 15:43 ` Mark Kennedy
2021-11-18 23:39 ` Mark Kennedy
2021-11-19 7:01 ` Eli Zaretskii
2021-11-19 7:54 ` Eli Zaretskii
2021-11-19 9:26 ` martin rudalics [this message]
2021-11-19 13:18 ` Mark Kennedy
2021-11-20 8:03 ` Eli Zaretskii
2021-11-20 8:48 ` martin rudalics
2021-11-20 9:07 ` Eli Zaretskii
2021-11-20 9:56 ` martin rudalics
2021-11-20 10:08 ` Eli Zaretskii
2021-11-21 9:12 ` martin rudalics
2021-11-21 14:56 ` Mark Kennedy
2021-11-21 15:00 ` Eli Zaretskii
2021-11-21 15:20 ` Mark Kennedy
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=be8a702e-16d8-6ba0-ee82-721b540b627c@gmx.at \
--to=rudalics@gmx.at \
--cc=51794@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mark.t.kennedy@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).