Skip to content

Don't crash when a screen gets disabled and enabled again

Marco Martin requested to merge work/mart/dontcrashonscreenswap into master

when a screen gets disabled, the containment loses its view, and when gets enabled again, the process of the old orphaned containment getting a new view causes a plasma crash. It comes from the wallpaper, which indicates a hyerarchy of C++ owned objects makes the internal one (wallaper) to not reset correctly its window and ahave a stray pointer to it.

Delete the wallpaper when losing a view (freeing up some memory as a bonus) and recreate it when the containment gets a view again.

add a destroy() method to the view that does the reparenting of the containment to disconnect it from the view before and delay deletion afterwards

Merge request reports