mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-06 18:05:39 +00:00
input: check if the focus surface has a valid resource
the resource can be NULL in some cases, like when the focus is taken by the black_surface used in shell.c as fullscreen background.
This commit is contained in:
parent
c0b9487937
commit
1fd4b01d10
|
@ -1110,6 +1110,11 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
|
|||
|
||||
if (pointer->focus == NULL)
|
||||
return;
|
||||
/* pointer->focus->resource can be NULL. Surfaces like the
|
||||
black_surface used in shell.c for fullscreen don't have
|
||||
a resource, but can still have focus */
|
||||
if (pointer->focus->resource == NULL)
|
||||
return;
|
||||
if (wl_resource_get_client(pointer->focus->resource) != client)
|
||||
return;
|
||||
if (pointer->focus_serial - serial > UINT32_MAX / 2)
|
||||
|
|
Loading…
Reference in a new issue