diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-12-07 11:21:20 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-12-07 11:21:20 -0500 |
| commit | 02fe3572fa957bf3e83d064bbf3715a44ada1ef4 (patch) | |
| tree | e5dffb24c9f042988e9279a6bb2d70ee3dbc117c /include | |
| parent | e90825c1d85ea21284306373382cc80b189cdca1 (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')
| -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; |
