diff options
author | Po Lu <luangruo@yahoo.com> | 2023-01-17 18:28:37 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-01-17 18:30:40 +0800 |
commit | b9025c507a3a7dae4de19b18cafaa09b18183832 (patch) | |
tree | f4c8713acac5af7287a12b7f713611593747c441 /src/xterm.h | |
parent | bb383a54910c3094e5d228e0af62bf70e36203ca (diff) | |
download | emacs-b9025c507a3a7dae4de19b18cafaa09b18183832.tar.gz |
Correctly handle touches on the tool bar
* src/xterm.c (xi_link_touch_point): New argument `frame'. Set
new field `touchpoint->frame' to it.
(xi_unlink_touch_points): New function.
(xi_disable_devices): Clear the tool bar device on frames whose
tool bar device matches this field.
(handle_one_xevent): If an XI_TouchBegin event lands on the tool
bar, then simulate a pointer click. Ignore future events from
that touchpoint from there onwards.
(x_make_frame_invisible, x_free_frame_resources): Unlink touch
points associated with the frame.
* src/xterm.h (struct xi_touch_point_t): New field `frame'.
(struct x_output): New fields for keeping track of tool bar
touches.
Diffstat (limited to 'src/xterm.h')
-rw-r--r-- | src/xterm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xterm.h b/src/xterm.h index d768ba7ff8d..28ae00ca190 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -257,10 +257,17 @@ struct xi_scroll_valuator_t struct xi_touch_point_t { + /* The next touch point in this list. */ struct xi_touch_point_t *next; + /* The touchpoint detail. */ int number; + + /* The last known X and Y position of the touchpoint. */ double x, y; + + /* The frame associated with this touch point. */ + struct frame *frame; }; #endif @@ -1295,6 +1302,16 @@ struct x_output VisibilityFullyObscured, but is set to something else in handle_one_xevent. */ int visibility_state; + +#ifdef HAVE_XINPUT2_2 + /* The touch ID of the last touch point to have touched the tool + bar. */ + int tool_bar_touch_id; + + /* The device that last touched the tool bar. 0 if no device + touched the tool bar. */ + int tool_bar_touch_device; +#endif }; enum |