Implement relative pointer protocol

* 12to11.c (XLMain): Initialize relative pointer.
* 12to11.man: Document new protocol.
* Imakefile (SRCS): Add relative_pointer.c.
(OBJS): Add relative_pointer.o.
(relative-pointer-unstable-v1): New scanner target.
* README: Document support for new protocol.
* compositor.h: Update prototypes.
* pointer_constraints.c (HandleResourceDestroy)
(HandleSeatDestroyed): Don't destroy commit callback if not
attached.
* seat.c (struct _Keyboard): Fix comment.
(struct _RelativePointer): New structure.
(struct _SeatClientInfo): Add relative pointer fields.
(CreateSeatClientInfo, ReleaseSeatClientInfo): Initialize and
check relative pointer list.
(SendRelativeMotion): New function.
(EnteredSurface): Clear surface coordinate set flag.
(DispatchMotion): Dispatch relative motion if possible.
(DispatchBarrierHit, XLGetGEWindowForSeats, XLSelectStandardEvents)
(XLDispatchGEForSeats): Handle barrier hit events for relative
motion.
(XLSeatGetRelativePointer, XLSeatDestroyRelativePointer): New
functions.
This commit is contained in:
oldosfan 2022-10-16 11:35:56 +00:00
parent 297c79d600
commit c1959e5f22
7 changed files with 168 additions and 15 deletions

View file

@ -24,7 +24,7 @@ SRCS = 12to11.c run.c alloc.c fns.c output.c compositor.c \
picture_renderer.c explicit_synchronization.c transform.c \
wp_viewporter.c decoration.c text_input.c \
single_pixel_buffer.c drm_lease.c pointer_constraints.c \
time.c
time.c relative_pointer.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 \
@ -35,7 +35,7 @@ OBJS = 12to11.o run.o alloc.o fns.o output.o compositor.o \
picture_renderer.o explicit_synchronization.o transform.o \
wp_viewporter.o decoration.o text_input.o \
single_pixel_buffer.o drm_lease.o pointer_constraints.o \
time.o
time.o relative_pointer.o
GENHEADERS = transfer_atoms.h
@ -120,6 +120,7 @@ ScannerTarget(text-input-unstable-v3)
ScannerTarget(single-pixel-buffer-v1)
ScannerTarget(drm-lease-v1)
ScannerTarget(pointer-constraints-unstable-v1)
ScannerTarget(relative-pointer-unstable-v1)
/* Make OBJS depend on scanner headers, and depend on both them and SRCS. */
$(OBJS): $(GENHEADERS)