emacs-devel
[Top][All Lists]
Advanced

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

Re: mouse-drag-and-drop-region


From: Alex
Subject: Re: mouse-drag-and-drop-region
Date: Sat, 18 Nov 2017 00:48:27 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Eli Zaretskii <address@hidden> writes:
>> If so, do you know why?
>
> Because TTY menus are implemented by overwriting parts of the glyph
> matrix with text that comes "out of nowhere", as far as the normal
> redisplay is concerned.  IOW, there's no buffer or display string or
> overlay string that the display engine knows about that produce this
> text.  So if we let the command loop do its thing, it will eventually
> enter redisplay, and the menu will be erased, partially or fully.

Oh, that's unfortunate.  Thanks for the explanation.

>> > If that, too, disappears when GTK tooltips are not used, then maybe
>> > it's due to the way we show GTK tooltips.
>> 
>> I don't believe this one has to do with GTK.  If you set `track-mouse' to
>> t, then, after the first pixel movement, you will only see
>> mouse-movement events when you move the mouse to a whole character
>> position.  This might be intentional, but I think it's poor behaviour.
>
> Can you show a Lisp recipe to reproduce this?

  (setq track-mouse t)
  (setq count 0)

  (global-set-key [mouse-movement]
                  (lambda ()
                    (interactive)
                    (message "%d" (setq count (1+ count)))))

This will only message on the first mouse-movement event (after a
non-mouse-movement event), and after moving to a new character position.
It also messages after a down-click, which feels like a bug.



reply via email to

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