Implement support for pointer-gestures-unstable-v1

* 12to11.c (XLMain): Initialize pointer gestures.
* 12to11.man (supported): Document that pointer gestures are now
supported.
* Imakefile (SRCS): Add pointer_gestures.c.
(OBJS): Add pointer_gestures.o.
(pointer-gestures-unstable-v1): New scanner target.
* README (supported): Documentation changes.
* compositor.h: Update prototypes.  Export xi2_major and
xi2_minor from seat.c.
* seat.c (struct _SwipeGesture, struct _PinchGesture): New
structures.
(struct _SeatClientInfo, CreateSeatClientInfo): Initialize those
structures in the seat client info.
(EnteredSurface): Clear any gestures if the surface changed.
(SendGesturePinchBegin, SendGesturePinchUpdate)
(SendGesturePinchEnd, DispatchGesturePinch, SendGestureSwipeBegin)
(SendGestureSwipeUpdate, SendGestureSwipeEnd,
DispatchGestureEnd): New functions.
(XLGetGEWindowForSeats, XLSelectStandardEvents)
(XLDispatchGEForSeats): Handle and select for various kinds of
XI events.
(XLInitSeats): Ask for XI 2.4.
(XLSeatGetSwipeGesture, XLSeatGetPinchGesture)
(XLSeatDestroySwipeGesture, XLSeatDestroyPinchGesture): New
functions.
This commit is contained in:
hujianwei 2022-11-01 11:02:36 +00:00
parent 000231fbb2
commit 168ce048be
6 changed files with 569 additions and 4 deletions

View file

@ -25,7 +25,7 @@ SRCS = 12to11.c run.c alloc.c fns.c output.c compositor.c \
wp_viewporter.c decoration.c text_input.c \
single_pixel_buffer.c drm_lease.c pointer_constraints.c \
time.c relative_pointer.c keyboard_shortcuts_inhibit.c \
idle_inhibit.c process.c fence_ring.c
idle_inhibit.c process.c fence_ring.c pointer_gestures.c
OBJS = 12to11.o run.o alloc.o fns.o output.o compositor.o \
surface.o region.o shm.o atoms.o subcompositor.o positioner.o \
@ -37,7 +37,7 @@ OBJS = 12to11.o run.o alloc.o fns.o output.o compositor.o \
wp_viewporter.o decoration.o text_input.o \
single_pixel_buffer.o drm_lease.o pointer_constraints.o \
time.o relative_pointer.o keyboard_shortcuts_inhibit.o \
idle_inhibit.o process.o fence_ring.o
idle_inhibit.o process.o fence_ring.o pointer_gestures.o
GENHEADERS = transfer_atoms.h drm_modifiers.h
@ -128,6 +128,7 @@ ScannerTarget(pointer-constraints-unstable-v1)
ScannerTarget(relative-pointer-unstable-v1)
ScannerTarget(keyboard-shortcuts-inhibit-unstable-v1)
ScannerTarget(idle-inhibit-unstable-v1)
ScannerTarget(pointer-gestures-unstable-v1)
/* Make OBJS depend on scanner headers, and depend on both them and SRCS. */
$(OBJS): $(GENHEADERS)