aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/cursor.h
diff options
context:
space:
mode:
authorLibravatar Benjamin Cheng <ben@bcheng.me>2019-12-07 11:21:20 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-12-07 12:26:21 -0500
commit9ef026e8047a012e06497a71923c4b3bc0c9df71 (patch)
treee5dffb24c9f042988e9279a6bb2d70ee3dbc117c /include/sway/input/cursor.h
parentA Script to change sway workspace name. (diff)
downloadsway-9ef026e8047a012e06497a71923c4b3bc0c9df71.tar.gz
sway-9ef026e8047a012e06497a71923c4b3bc0c9df71.tar.zst
sway-9ef026e8047a012e06497a71923c4b3bc0c9df71.zip
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/cursor.h')
-rw-r--r--include/sway/input/cursor.h9
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 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include <stdint.h> 4#include <stdint.h>
5#include <wlr/types/wlr_pointer_constraints_v1.h> 5#include <wlr/types/wlr_pointer_constraints_v1.h>
6#include <wlr/types/wlr_pointer_gestures_v1.h>
6#include <wlr/types/wlr_surface.h> 7#include <wlr/types/wlr_surface.h>
7#include "sway/input/seat.h" 8#include "sway/input/seat.h"
8 9
@@ -32,6 +33,14 @@ struct sway_cursor {
32 struct wlr_pointer_constraint_v1 *active_constraint; 33 struct wlr_pointer_constraint_v1 *active_constraint;
33 pixman_region32_t confine; // invalid if active_constraint == NULL 34 pixman_region32_t confine; // invalid if active_constraint == NULL
34 35
36 struct wlr_pointer_gestures_v1 *pointer_gestures;
37 struct wl_listener pinch_begin;
38 struct wl_listener pinch_update;
39 struct wl_listener pinch_end;
40 struct wl_listener swipe_begin;
41 struct wl_listener swipe_update;
42 struct wl_listener swipe_end;
43
35 struct wl_listener motion; 44 struct wl_listener motion;
36 struct wl_listener motion_absolute; 45 struct wl_listener motion_absolute;
37 struct wl_listener button; 46 struct wl_listener button;