From 6ac7fa7e78b84a6fbdf12a63d927ad55bacd8d91 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 8 Apr 2022 08:22:40 +0800 Subject: [PATCH] Fix reporting of last-event-device for synthetic events * src/keyboard.c (read_char): Clear `last-event-device' earlier. --- src/keyboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 8142ffec2df..01274b4d4a8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2465,6 +2465,7 @@ read_char (int commandflag, Lisp_Object map, else reread = false; + Vlast_event_device = Qnil; if (CONSP (Vunread_command_events)) { @@ -2525,8 +2526,6 @@ read_char (int commandflag, Lisp_Object map, goto reread_for_input_method; } - Vlast_event_device = Qnil; - if (!NILP (Vexecuting_kbd_macro)) { /* We set this to Qmacro; since that's not a frame, nobody will -- 2.39.5