Skip to content

Fix "dangling" scene window connections

Vlad Zahorodnii requested to merge work/scene-window-qobject into master

We need to setup a couple of connections in order to ensure that things such as the window pixmap, the window quads cache, and the window shape will get discarded when a geometry update has occurred. Since the scene window is not a QObject, we use the scene as the receiver object. The problem with doing so is that the wayland surface may outlive the scene window (because the wayland surface got unmapped), so it's possible that the scene will access a dangling pointer when the surface is re-mapped.

This merge request turns the scene window in a QObject and switches the receiver object to the scene window to ensure that the connections will be cleaned up automatically and no dangling pointer will be accessed by the scene.

Edited by Vlad Zahorodnii

Merge request reports