From 501548ee3c7763171fd813c0c2461c6b0bb5100d Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 13 Dec 2016 12:54:18 +0100 Subject: Made the window closing handling more robust Instead of trusting the visible property, we now set a state to ensure that we know that the window is already handled Change-Id: Ie3b205b9c458789fed142dc9cb9ed3b58c9db8b9 Reviewed-by: Dominik Holland Reviewed-by: Nedim Hadzic --- imports/system/models/ApplicationManagerInterface.qml | 7 +++++-- sysui/LaunchController.qml | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/imports/system/models/ApplicationManagerInterface.qml b/imports/system/models/ApplicationManagerInterface.qml index 5485b5d..2dd32da 100644 --- a/imports/system/models/ApplicationManagerInterface.qml +++ b/imports/system/models/ApplicationManagerInterface.qml @@ -150,8 +150,8 @@ QtObject { //For special windows (cluster, widgets) we don't have a closing anmiation, close them directly if (type === "ivi") { - //If the item is visible the closing application hasn't been played yet and we need to wait until it is finished - if (item.visible) { + //If the item is in the closing state the closing animation hasn't been played yet and we need to wait until it is finished + if (item.state === "closing" ) { itemsToRelease.push(item) root.releaseApplicationSurface(item) } else { @@ -183,10 +183,13 @@ QtObject { var isWidget = (WindowManager.windowProperty(item, "windowType") === "widget") var isMapWidget = (WindowManager.windowProperty(item, "windowType") === "widgetMap") var isClusterWidget = (WindowManager.windowProperty(item, "windowType") === "clusterWidget") + print(":::LaunchController:::isClusterWidget", isClusterWidget) print(":::LaunchController:::isWidget", isWidget, isMapWidget) if (!isMapWidget && !isClusterWidget) { + if (windowTypes[item] === "minimized") + windowTypes[item] = "ivi" WindowManager.setWindowProperty(item, "visibility", true) root.applicationSurfaceReady(item, false) break diff --git a/sysui/LaunchController.qml b/sysui/LaunchController.qml index 88e43aa..aeb1d9b 100644 --- a/sysui/LaunchController.qml +++ b/sysui/LaunchController.qml @@ -146,6 +146,8 @@ StackView { if (root.busy) root.completeTransition() + item.state = "closing" + if (item == root.currentItem) { var stackItem = null; if (root.depth > 2) -- cgit v1.2.3