diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2016-10-19 14:49:51 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2016-10-19 14:16:42 +0000 |
commit | 3afd286f5a364c4ba91cc5e4d7b7a2ef898e3c86 (patch) | |
tree | 6058fa272d8455fcb505293405ba2b0f80fcbf1c | |
parent | 745cba6149398608dd67dfa4de1c3429a13a2ade (diff) |
Fixed handling of not accepted windows
All WaylandSurfaces regardless of whether they are accepted or not
need to part of the visual QtQuick item tree, otherwise they will block
the event loop of the client.
This commit introduces a unhandledSurfaceReceived signal, which is
handled by the LaunchController and reparents the surface into the
visual QtQuick item tree.
Change-Id: I80f3de7ef9183ecdade7c4683e4087ea3f5e12fa
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | imports/system/models/ApplicationManagerInterface.qml | 3 | ||||
-rw-r--r-- | sysui/LaunchController.qml | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/imports/system/models/ApplicationManagerInterface.qml b/imports/system/models/ApplicationManagerInterface.qml index b8b4017..5485b5d 100644 --- a/imports/system/models/ApplicationManagerInterface.qml +++ b/imports/system/models/ApplicationManagerInterface.qml @@ -50,6 +50,7 @@ QtObject { signal applicationSurfaceReady(Item item, bool isMinimized) signal releaseApplicationSurface(Item item) + signal unhandledSurfaceReceived(Item item) // Cluster signals signal clusterWidgetReady(string category, Item item) @@ -91,7 +92,6 @@ QtObject { } else if (isClusterWidget) { if (!Style.withCluster) { acceptWindow = false - item.parent = null } else { windowTypes[item] = "cluster" if (ApplicationManager.get(appID).categories[0] === "navigation") @@ -126,6 +126,7 @@ QtObject { root.applicationSurfaceReady(item, isMinimized) } else { + root.unhandledSurfaceReceived(item) console.error("window was not accepted: ", item) } } diff --git a/sysui/LaunchController.qml b/sysui/LaunchController.qml index 76a4659..88e43aa 100644 --- a/sysui/LaunchController.qml +++ b/sysui/LaunchController.qml @@ -193,5 +193,10 @@ StackView { onReleaseApplicationSurface: { root.popItem(item) } + + onUnhandledSurfaceReceived: { + item.visible = false + item.parent = dummyitem + } } } |