summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2016-12-13 12:54:18 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2016-12-13 14:49:28 +0000
commit501548ee3c7763171fd813c0c2461c6b0bb5100d (patch)
tree5fc54eb190055d2a53b3508b35fa5944d94e167b
parentd98753dc5964c6806657572649c69d6b1bd9459e (diff)
downloadneptune-ui-501548ee3c7763171fd813c0c2461c6b0bb5100d.tar.gz
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 <dominik.holland@pelagicore.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
-rw-r--r--imports/system/models/ApplicationManagerInterface.qml7
-rw-r--r--sysui/LaunchController.qml2
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)