Skip to content

renderer/native: Detach old onscreens when rebuilding views

With detach meaning having the onscreen stop listening on configuration changes on the corresponding backing mode setting objects. We need to do this as there is a time between rebuilding the views, and that the new mode sets are called, where the old onscreen is kept alive, but the stage view is gone. At this point in time, if privacy screen or gamma configuration changes, e.g. by the night light temperature changing, the onscreen would attempt to schedule an update on the now gone stage view.

This commit also renames the "keep onscreen alive" to "detached onscreens" to more clearly communicate that it's detached onscreens from their corresponding mode setting objects.

Closes: #2621 (closed)


Tried to add tests for this, but eventually failed, because vkms doesn't support gamma.

Also a minor leak fix as a bonus.

Merge request reports