[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 72782ca182: Use right frame when computing mouse movement device
From: |
Po Lu |
Subject: |
master 72782ca182: Use right frame when computing mouse movement device |
Date: |
Fri, 8 Apr 2022 23:38:52 -0400 (EDT) |
branch: master
commit 72782ca182993dac6bd805bb3b54b21b7e7efa7d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Use right frame when computing mouse movement device
* src/keyboard.c (kbd_buffer_get_event): Use the frame on which
the mouse actually moved to compute the last mouse device.
---
src/keyboard.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/keyboard.c b/src/keyboard.c
index 642ae7d7e0..98eebaf7f5 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4275,12 +4275,13 @@ kbd_buffer_get_event (KBOARD **kbp,
/* Try generating a mouse motion event. */
else if (some_mouse_moved ())
{
- struct frame *f = some_mouse_moved ();
+ struct frame *f, *movement_frame = some_mouse_moved ();
Lisp_Object bar_window;
enum scroll_bar_part part;
Lisp_Object x, y;
Time t;
+ f = movement_frame;
*kbp = current_kboard;
/* Note that this uses F to determine which terminal to look at.
If there is no valid info, it does not store anything
@@ -4317,8 +4318,8 @@ kbd_buffer_get_event (KBOARD **kbp,
obj = make_lispy_movement (f, bar_window, part, x, y, t);
if (!NILP (obj))
- Vlast_event_device = (f && STRINGP (f->last_mouse_device)
- ? f->last_mouse_device
+ Vlast_event_device = (STRINGP (movement_frame->last_mouse_device)
+ ? movement_frame->last_mouse_device
: virtual_core_pointer_name);
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 72782ca182: Use right frame when computing mouse movement device,
Po Lu <=