diff options
author | Po Lu <luangruo@yahoo.com> | 2022-07-26 05:41:25 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-07-26 05:42:42 +0000 |
commit | 2bc6d8283189bcbbf9bceeac5013b9e41a511222 (patch) | |
tree | 85a119ef690ab01d0690c4e605dd272cf1b1fc2b /src/haikuselect.c | |
parent | f6040018c5e281ee31a3e499f43f29fbf1e817e9 (diff) | |
download | emacs-2bc6d8283189bcbbf9bceeac5013b9e41a511222.tar.gz |
Handle modifiers during Haiku DND wheel movement
* lisp/term/haiku-win.el (haiku-dnd-modifier-mask)
(haiku-dnd-wheel-modifier-type): New functions.
(haiku-handle-drag-wheel): Use them.
* lisp/x-dnd.el (x-dnd-modifier-mask): Remove outdated comment.
* src/haikuselect.c (haiku_note_drag_wheel): Pass modifiers to
wheel function.
(syms_of_haikuselect): Update doc strings.
Diffstat (limited to 'src/haikuselect.c')
-rw-r--r-- | src/haikuselect.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/haikuselect.c b/src/haikuselect.c index 268d8b1ec92..7eb93a2754d 100644 --- a/src/haikuselect.c +++ b/src/haikuselect.c @@ -1062,8 +1062,9 @@ haiku_note_drag_wheel (struct input_event *ie) if (!NILP (Vhaiku_drag_wheel_function) && (haiku_dnd_allow_same_frame || XFRAME (ie->frame_or_window) != haiku_dnd_frame)) - safe_call (6, Vhaiku_drag_wheel_function, ie->frame_or_window, - ie->x, ie->y, horizontal ? Qt : Qnil, up ? Qt : Qnil); + safe_call (7, Vhaiku_drag_wheel_function, ie->frame_or_window, + ie->x, ie->y, horizontal ? Qt : Qnil, up ? Qt : Qnil, + make_int (ie->modifiers)); redisplay_preserve_echo_area (35); } @@ -1149,12 +1150,12 @@ These are only called if a connection to the Haiku display was opened. */); DEFVAR_LISP ("haiku-drag-wheel-function", Vhaiku_drag_wheel_function, doc: /* Function called upon wheel movement while dragging a message. -If non-nil, it is called with 5 arguments when the mouse wheel moves +If non-nil, it is called with 6 arguments when the mouse wheel moves while a drag-and-drop operation is in progress: the frame where the mouse moved, the frame-relative X and Y positions where the mouse -moved, whether or not the wheel movement was horizontal, and whether -or not the wheel moved up (or left, if the movement was -horizontal). */); +moved, whether or not the wheel movement was horizontal, whether or +not the wheel moved up (or left, if the movement was horizontal), and +keyboard modifiers currently held down. */); Vhaiku_drag_wheel_function = Qnil; DEFSYM (QSECONDARY, "SECONDARY"); |