workspace: Disconnect "hide-chrome" signal when destroying window clone

The "key-focus-out" signal of the WindowClone actor is emitted after its "destroy" signal (the actor gets removed from its parent after emitting "destroy"), which means that we emit "hide-chrome" after the overlay actors are destroyed. That in turn means we start a new overlay idle hide timeout after the _onDestroy() method of the overlay was called, and when the newly started timeout finishes we get error messages because the overlay actors are already destroyed.

To prevent this from happening, store the "hide-chrome" connection id and disconnect the signal when the WindowClone is destroyed.

This fixes a regression that was introduced with 5f10047b, because before that commit we'd set stage focus to NULL on the BUTTON_PRESS of the close button, which means the last "key-focus-out" event on the WindowClone happens before the clone is destroyed.

Fixes #1704 (closed)

Edited by Jonas Dreßler

Merge request reports