]> git.eshelyaron.com Git - emacs.git/commit
Correct mouse handling when window origin changes between down and up events
authorAlan Mackenzie <acm@muc.de>
Mon, 31 May 2021 10:33:10 +0000 (10:33 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 31 May 2021 10:33:10 +0000 (10:33 +0000)
commit6e2d3bce087d30a535b1f01715d7820576ffe390
tree66cadf98c10587225c1e0a68076dac378337c109
parent0b1dfb5de601c945e88e98c8fc40611d015a8b77
Correct mouse handling when window origin changes between down and up events

Do this by using frame relative positions rather than window relative ones,
which gave rise to spurious drag events when the origin of the window changed
between the mouse down and up events.  This fixes bug #48409.

* keyboard.c (frame_relative_event_pos): New static variable.
(make_lispy_event): Record frame relative position of down event.  When the up
event is in the same position, "move" this event into the window of the down
event when this window (typically a mini-window) is no longer under the mouse.
Call make_lispy_position a second time to generate this changed event.
(syms_of_keyboard): Declare Qwindow_edges.  static_pro
frame_relative_event_pos.
src/keyboard.c