mirror of
https://github.com/swaywm/sway.git
synced 2025-11-18 06:59:48 -05:00
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
This commit is contained in:
parent
1cad862458
commit
9ef026e804
2 changed files with 77 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue