From 9ef026e8047a012e06497a71923c4b3bc0c9df71 Mon Sep 17 00:00:00 2001 From: Benjamin Cheng Date: Sat, 7 Dec 2019 11:21:20 -0500 Subject: 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 --- include/sway/input/cursor.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/sway/input/cursor.h') 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 #include #include +#include #include #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; -- cgit v1.2.3-54-g00ecf