mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
Add timestamp to pointer image attach request
This lets the server discard requests received after the pointer has exited and the re-entered a surface.
This commit is contained in:
parent
6dcf8718ae
commit
ce457ba68c
7 changed files with 15 additions and 13 deletions
|
|
@ -706,6 +706,7 @@ wlsc_input_device_set_pointer_focus(struct wlsc_input_device *device,
|
|||
WLSC_POINTER_LEFT_PTR);
|
||||
|
||||
device->pointer_focus = surface;
|
||||
device->pointer_focus_time = time;
|
||||
}
|
||||
|
||||
static struct wlsc_surface *
|
||||
|
|
@ -980,12 +981,15 @@ notify_key(struct wlsc_input_device *device,
|
|||
static void
|
||||
input_device_attach(struct wl_client *client,
|
||||
struct wl_input_device *device_base,
|
||||
uint32_t time,
|
||||
struct wl_buffer *buffer_base, int32_t x, int32_t y)
|
||||
{
|
||||
struct wlsc_input_device *device =
|
||||
(struct wlsc_input_device *) device_base;
|
||||
struct wlsc_buffer *buffer = (struct wlsc_buffer *) buffer_base;
|
||||
|
||||
if (time < device->pointer_focus_time)
|
||||
return;
|
||||
if (device->pointer_focus == NULL)
|
||||
return;
|
||||
if (device->pointer_focus->base.client != client &&
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ struct wlsc_input_device {
|
|||
struct wlsc_surface *keyboard_focus;
|
||||
struct wl_array keys;
|
||||
uint32_t modifier_state;
|
||||
uint32_t pointer_focus_time;
|
||||
|
||||
enum wlsc_grab_type grab;
|
||||
struct wlsc_surface *grab_surface;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue