Skip to content
  • Marco Trevisan's avatar
    surface-actor-x11: Bind the surface actor resources to window actor life · 947da2c5
    Marco Trevisan authored and Marco Trevisan's avatar Marco Trevisan committed
    X11 actors need to release the server data (pixmap and damage) before the
    display is closed.
    During the close phase all the windows are unmanaged and this causes the window
    actors to be removed from the compositor, unsetting their actor surface.
    
    However, in case a window is animating the surface might not be destroyed until
    the animation is completed and a reference to it kept around by gjs in the shell
    case. By the way, per commit 7718e67f all window actors (even the animating
    ones) are destroyed before the display is closed, but this is not true for the
    child surface, because the parent window will just unref it, leaving it around
    if reffed somewhere else. This is fine for wayland surfaces, but not for X11
    ones which are bound to server-side pixmaps.
    
    So, connect to the parent MetaWindowActor "destroy" signal, releasing the x11
    resources that implies detaching the pixmap (unsetting the texture) and removing
    the damages.
    
    Closes: #629
    !660
    
    
    (cherry picked from commit de97b545)
    947da2c5