Skip to content
  • Alexandros Frantzis's avatar
    libweston: Make weston_pointer destruction safe · 1c3a40ed
    Alexandros Frantzis authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    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: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    1c3a40ed