[PATCH weston v2 2/7] libweston: Make weston_pointer destruction safe

Pekka Paalanen ppaalanen at gmail.com
Tue Feb 13 10:09:35 UTC 2018

On Thu,  8 Feb 2018 15:37:53 +0200
Alexandros Frantzis <alexandros.frantzis at collabora.com> wrote:

> Properly clean up all sub-objects (e.g., weston_pointer_client objects)
> when a weston_pointer object is destroyed. The clean-up ensures that the
> server is able to safely handle client requests to any associated
> pointer resources, which, as a consenquence of a weston_pointer
> destruction, have now become inert.
> The clean-up involves, among other things, unsetting the destroyed
> weston_pointer object from the user data of pointer resources, and
> handling this NULL user data case where required. Note that in many
> sites affected by this change the existing code already properly handles
> NULL weston_pointer (e.g. in init_pointer_constraint), so there is no
> need for additional updates there.
> Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
> ---
> Changes in v2:
>  - Removed NULL check before calling init_pointer_constraint, since
>    init_pointer_constraint now handles this case.
>  - Handle NULL weston_pointer in zoom functions.
>  libweston/input.c | 35 ++++++++++++++++++++++++++++++-----
>  libweston/zoom.c  |  5 ++++-
>  2 files changed, 34 insertions(+), 6 deletions(-)

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180213/7a5eb605/attachment.sig>

More information about the wayland-devel mailing list