From c626ab736c1a0d64f8be5ce6da13571be8234b4b Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 27 Apr 2021 18:27:43 +0100 Subject: [PATCH 1/2] NOTE! Default branch is now main To update your local repository to use the new default branch, these commands may help: $ git fetch origin $ git checkout master $ git branch -m main $ git branch --set-upstream-to=origin/main Signed-off-by: Daniel Stone From 69a4b80dfafc1663cd76a2fe8f14fe19cd030ffd Mon Sep 17 00:00:00 2001 From: Lu YaNing Date: Mon, 9 Oct 2023 15:23:14 +0800 Subject: [PATCH 2/2] protocol: add wl_pointer.warp event The original wl_pointer.button event does not contain the position information. In some scenarios, the client cannot obtain the correct position information. For example, when the mouse focus is on a button and the mouse does not move but the window size changes, the client cannot update the position information through the motion event, resulting in incorrect mouse position. Therefore, This event should be sent when the local coordinates of a pointer change as a result of surface being moved/resized/fullscreened. Signed-off-by: Lu YaNing --- protocol/wayland.xml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index bee74a10..b961f187 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -1886,7 +1886,7 @@ - + A seat is a group of keyboards, pointer and touch devices. This object is published as a global during start up, or when such a @@ -2020,7 +2020,7 @@ - + The wl_pointer interface represents one or more input devices, such as mice, which control the pointer location and pointer_focus @@ -2130,8 +2130,9 @@ Mouse button click and release notifications. - The location of the click is given by the last motion or + The location of the click is given by the last motion, warp or enter event. + The time argument is a timestamp with millisecond granularity, with an undefined base. @@ -2431,9 +2432,30 @@ + + + + + + Notification of pointer location change within a surface. + This location change is not due to events on the input device, + but because either the surface under the pointer was moved and + thus the relative position of the pointer changed, or because + the compositor changed the pointer position in response to + an event like pointer confinement being exited. The arguments + surface_x and surface_y are the location relative to the + focused surface. + + This event must not occur in the same wl_pointer.frame as a + wl_pointer.enter or wl_pointer.motion event. + + + + + - + The wl_keyboard interface represents one or more keyboards associated with a seat. @@ -2614,7 +2636,7 @@ - + The wl_touch interface represents a touchscreen associated with a seat.