Skip to content
  • Jasper St. Pierre's avatar
    server: Don't expose wl_display as a global · 78d80474
    Jasper St. Pierre authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    The idea here was that once upon a time, clients could rebind wl_display
    to a higher version, so we offered the ability to rebind it
    here. However, this is particularly broken. The existing bind
    implementation actually still hardcodes version numbers, and it leaks
    previous resources, overwriting the existing one.
    
    The newly bound resource *also* won't have any listeners attached by the
    client, meaning that the error and delete_id events won't get delivered
    correctly. Unless the client poked into libwayland internals, it also
    can't possibly set up these handlers correctly either, so the client
    will sustain errors and leak all deleted globals.
    
    Since this never worked correctly in the first place, we can feel safe
    removing it.
    
    Acked-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    78d80474