Make sure the closed signal is emitted upon close

Otherwise some events never happen, like the screenshot request.
This commit is contained in:
Aleix Pol 2021-07-14 18:46:19 +02:00 committed by Aleix Pol Gonzalez
parent 204207f2a9
commit 4942e0e369

View file

@ -50,6 +50,9 @@ NanoShell.FullScreenOverlay {
Component.onCompleted: plasmoid.nativeInterface.panel = window;
onVisibleChanged: if (!visible) {
closed()
}
onInitiallyOpenedChanged: {
if (initiallyOpened) mainFlickable.focus = true;
}
@ -98,7 +101,6 @@ NanoShell.FullScreenOverlay {
if (window.offset <= 0) {
// close immediately, so that we don't have to wait units.longDuration
window.visible = false;
window.closed();
close();
} else if (window.direction === SlidingContainer.MovementDirection.None) {
if (window.offset < openThreshold) {