Subsurface: remove commit listener in destroy()
Currently if destroy() is called while a subsurface is mapped a dangling commit listener is left behind. This is obivously a problem, so check if the subsurface is mapped in destroy() and remove the listener if needed.
This commit is contained in:
parent
6616d32353
commit
8ec0e30fd7
@ -95,6 +95,8 @@ pub fn destroy(subsurface: *Subsurface) void {
|
|||||||
subsurface.unmap.link.remove();
|
subsurface.unmap.link.remove();
|
||||||
subsurface.new_subsurface.link.remove();
|
subsurface.new_subsurface.link.remove();
|
||||||
|
|
||||||
|
if (subsurface.wlr_subsurface.mapped) subsurface.commit.link.remove();
|
||||||
|
|
||||||
Subsurface.destroySubsurfaces(subsurface.wlr_subsurface.surface);
|
Subsurface.destroySubsurfaces(subsurface.wlr_subsurface.surface);
|
||||||
|
|
||||||
subsurface.wlr_subsurface.data = 0;
|
subsurface.wlr_subsurface.data = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user