Skip to content

surface-actor-x11: Bind the surface actor destruction to window actor

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, destroying the MetaSurfaceActorX11 as well. This will lead to a disposition that implies detaching the pixmap (unsetting the texture) and removing the damages.

Closes: #629 (closed) !660 (merged)

Edited by Marco Trevisan

Merge request reports

Loading