emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 8153f70: In make_lispy_position fix Bug#50993 in rudimentary fa


From: Martin Rudalics
Subject: emacs-28 8153f70: In make_lispy_position fix Bug#50993 in rudimentary fashion
Date: Thu, 14 Oct 2021 04:40:10 -0400 (EDT)

branch: emacs-28
commit 8153f70b9ccc1ebd0f1bf639691a0af5a8d9ad4f
Author: Martin Rudalics <rudalics@gmx.at>
Commit: Martin Rudalics <rudalics@gmx.at>

    In make_lispy_position fix Bug#50993 in rudimentary fashion
    
    * src/keyboard.c (make_lispy_position): Do not set posn to
    tool- or tab-bar when track_mouse is enabled (Bug#50993).
---
 src/keyboard.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/keyboard.c b/src/keyboard.c
index 4e47136..6895a24 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5122,7 +5122,20 @@ make_lispy_position (struct frame *f, Lisp_Object x, 
Lisp_Object y,
 #endif
       )
     {
-      posn = EQ (window_or_frame, f->tab_bar_window) ? Qtab_bar : Qtool_bar;
+      /* FIXME: While track_mouse is non-nil, we do not report this
+        event as something that happened on the tool or tab bar since
+        that would break mouse dragging operations that originate from
+        an ordinary window beneath and expect the window to auto-scroll
+        as soon as the mouse cursor appears above or beneath it
+        (Bug#50993).  Since this "fix" might break track_mouse based
+        operations originating from the tool or tab bar itself, such
+        operations should set track_mouse to some special value that
+        would be recognized by the following check.
+
+        This issue should be properly handled by 'mouse-drag-track' and
+        friends, so the below is only a temporary workaround.  */
+      if (NILP (track_mouse))
+       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
         we use to display those, and it wants frame-relative



reply via email to

[Prev in Thread] Current Thread [Next in Thread]