Cache the caption of ShellSurface in ShellClient
Summary: If the ShellSurface gets destroyed while a decoration repaint is pending, it is possible that on tear down the decoration calls into ShellClient::caption. This used to call into ShellSurfaceInterface::title which accesses a d-ptr which is already destroyed at that point. This change caches the caption instead of delegating to ShellSurface, just like almost everything else caches. Thus the tear down cannot access invalid memory. Once we can depend on Frameworks 5.24, we should also make sure to connect to the new Resource::unbound signal to be able to handle tear down prior to the object being completely deleted. Test Plan: Unfortunately no test case as this depends on phase-of-moon aligning of destruction of the interfaces Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D1913master
parent
0053b25903
commit
74f98d4c12
Loading…
Reference in New Issue