Skip to content

windowPreview: Ignore leave events after being destroyed

When a WindowPreview is being destroyed, the class default handler for the destroy signal is responsible for destroying its child actors. This happens after the emission of the destroy signal, i.e. after WindowPreview::_onDestroy() has been run.

The destruction of the WindowPreview's child actors now triggers a re-pick, but due to WindowPreview having already being marked as CLUTTER_IN_DESTRUCTION, it will not be picked, resulting in a leave event if the cursor was on top of the WindowPreview at the time destroy() was called on it.

So this leads to WindowPreview::vfunc_leave_event() being run after WindowPreview::_onDestroy(), which means the idle started by the leave event handler will not be removed and ends up accessing actors after they have already been destroyed.

Closes: #5512 (closed) Closes: #6065 (closed)

Merge request reports