summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/oclosure-tests.el
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-07 21:16:11 +0800
committerPo Lu <luangruo@yahoo.com>2022-04-07 21:16:11 +0800
commit3b411417086ceb2ce3838160d01c6f250e47bbf3 (patch)
tree7605008be2090be2cc58ba6df8df6c2d22b8184e /test/lisp/emacs-lisp/oclosure-tests.el
parentc1a6aa0c3eb1029e3f7f5c3b227d7952bee775b8 (diff)
downloademacs-3b411417086ceb2ce3838160d01c6f250e47bbf3.tar.gz
emacs-3b411417086ceb2ce3838160d01c6f250e47bbf3.tar.bz2
emacs-3b411417086ceb2ce3838160d01c6f250e47bbf3.zip
Expose the name of an event's input device to Lisp
This name can be used to identify the device for special treatment, i.e. only interpolating scrolls coming from mice and not touchpads inside pixel-scroll-precision-mode. * doc/lispref/commands.texi (Command Loop Info): Document new variable `last-event-device'. * etc/NEWS: Announce new variable `last-event-device'. * src/frame.h (struct frame): New field `last_mouse_device'. * src/keyboard.c (read_char): Clear last-event-device. (kbd_buffer_get_event): Set last-event-device to the event's recorded device. (init_keyboard): Clear last-event-device. (syms_of_keyboard): New defvar `last-event-device'. * src/termhooks.h (struct input_event): New field `device'. (EVENT_INIT): Set it to the special value `Qt' by default. * src/xterm.c (x_init_master_valuators): Record the device's name. (x_dnd_begin_drag_and_drop): Only preserve last event device if the mouse ended up in the source frame. (x_note_mouse_movement): New argument `source'. (handle_one_xevent): Set input event sources whenever appropriate. (mark_xterm): Mark device names. * src/xterm.h (struct xi_device_t): New field `name'.
Diffstat (limited to 'test/lisp/emacs-lisp/oclosure-tests.el')
0 files changed, 0 insertions, 0 deletions