GNU bug report logs - #50993
29.0.50; Problems when dragging the mouse over the toolbar

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Sun, 3 Oct 2021 12:07:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 28.0.60

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 50993 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#50993: 29.0.50; Problems when dragging the mouse over the toolbar
Date: Mon, 11 Oct 2021 11:21:15 +0200
>> I'm too silly to understand how this is related to the issue at hand.
>> Can you please elaborate?
>
> AFAIU, mouse-movement events generated by moving the mouse over the
> toolbar don't contain a window, but rather the frame the toolbar belongs
> to.

Yes, but how does 'mouse-minibuffer-check' enter this picture?

> However, mouse-drag-track wants START-EVENT to contain a window.
>
>> So far I've been unable to reproduce this issue on Emacs 28.  Doesn't
>> 'mouse-drag-track', once started, conceptually have to get through
>> wherever the mouse pointer is - a child frame, the tool bar, another
>> frame, no frame at all?  Like scroll bar dragging with the mouse?
>
> You need a build without toolkit tool bars, I think.

I see.  Dragging the secondary selection seems to work here with the
trivial patch below.  Can you try it?

martin


diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5d4e05fa25..6da4635114 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2121,6 +2121,7 @@ mouse-drag-secondary
 	  (while (progn
 		   (setq event (read--potential-mouse-event))
 		   (or (mouse-movement-p event)
+		       (eq event 'tool-bar)
 		       (memq (car-safe event) '(switch-frame select-window))))

 	    (if (memq (car-safe event) '(switch-frame select-window))
@@ -2129,7 +2130,8 @@ mouse-drag-secondary
 		    end-point (posn-point end))
 	      (cond
 	       ;; Are we moving within the original window?
-	       ((and (eq (posn-window end) start-window)
+	       ((and (not (eq event 'tool-bar))
+		     (eq (posn-window end) start-window)
 		     (integer-or-marker-p end-point))
 		(let ((range (mouse-start-end start-point end-point
 					      click-count)))




This bug report was last modified 3 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.