diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2016-08-30 17:09:24 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2016-09-01 08:47:35 +0000 |
commit | dc7f8ff7c14e25f109990dd0cd42776e40d389b0 (patch) | |
tree | 9030cbbda282ef1b08ef4edbf3d7cf2aeb06db4e /Main.qml | |
parent | 9ebe067fd5b0fc62cd23117ae7b2f849da6cb336 (diff) |
Forward unhandled key events to the cluster
This way the ivi can be the active window and the cluster can still be
controlled
Change-Id: Ib600104b12ad2cf1a842dc683c35a9319257bf5c
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Diffstat (limited to 'Main.qml')
-rw-r--r-- | Main.qml | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -59,6 +59,9 @@ Rectangle { root.height = Window.height } + //Forwards the keys to the cluster to handle it without being the active window + Keys.forwardTo: cluster ? cluster.clusterItem : null + Item { width: Style.screenWidth height: Style.screenHeight @@ -87,9 +90,13 @@ Rectangle { width: Style.clusterWidth visible: false + property Item clusterItem: clusterItem + color: "black" - Cluster {} + Cluster { + id: clusterItem + } function calculateSize() { print (Screen.width, Screen.height) @@ -104,12 +111,8 @@ Rectangle { cluster.show() calculateSize() } - } - } - Window.onActiveChanged: { - if (Window.active && !WindowManager.runningOnDesktop) - cluster.requestActivate() + } } Component.onCompleted: { |