diff options
author | Benjamin Cheng <ben@bcheng.me> | 2019-12-07 11:21:20 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-12-07 12:26:21 -0500 |
commit | 9ef026e8047a012e06497a71923c4b3bc0c9df71 (patch) | |
tree | e5dffb24c9f042988e9279a6bb2d70ee3dbc117c /include/sway/input | |
parent | 1cad8624580eadf5b876b23727f2b9ea0b9bc057 (diff) |
input/cursor: pass gesture events to clients
Some wayland clients (mostly GTK3 apps) like eog or evince support
gestures like pinch-to-zoom. These gestures are given to clients
via the pointer_gestures_v1 protocol. This is already supported in
wlroots, so we just need to hook up the events here in sway.
Fixes #4724
Diffstat (limited to 'include/sway/input')
-rw-r--r-- | include/sway/input/cursor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index e46c9b18..0bcd262f 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -3,6 +3,7 @@ #include <stdbool.h> #include <stdint.h> #include <wlr/types/wlr_pointer_constraints_v1.h> +#include <wlr/types/wlr_pointer_gestures_v1.h> #include <wlr/types/wlr_surface.h> #include "sway/input/seat.h" @@ -32,6 +33,14 @@ struct sway_cursor { struct wlr_pointer_constraint_v1 *active_constraint; pixman_region32_t confine; // invalid if active_constraint == NULL + struct wlr_pointer_gestures_v1 *pointer_gestures; + struct wl_listener pinch_begin; + struct wl_listener pinch_update; + struct wl_listener pinch_end; + struct wl_listener swipe_begin; + struct wl_listener swipe_update; + struct wl_listener swipe_end; + struct wl_listener motion; struct wl_listener motion_absolute; struct wl_listener button; |