diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-04-09 17:09:34 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-04-10 19:43:41 +0300 |
commit | 745f1d9e86e8cbd83c5ae84aba2513341da5ad7a (patch) | |
tree | 4e1b56f2ac78161fd3efb976c7409853a9146500 /homescreen/qml/ShortcutArea.qml | |
parent | 5030e956bc95325305ecfa0c2be55bfd47adcade (diff) |
ShortcutArea: use the launcher to verify if the app is runningsandbox/mvlad/agl-compositor-old
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic583786b64a19bd5fd59a230d39dc4bc2cbe4603
Diffstat (limited to 'homescreen/qml/ShortcutArea.qml')
-rw-r--r-- | homescreen/qml/ShortcutArea.qml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/homescreen/qml/ShortcutArea.qml b/homescreen/qml/ShortcutArea.qml index a638d87..2bde841 100644 --- a/homescreen/qml/ShortcutArea.qml +++ b/homescreen/qml/ShortcutArea.qml @@ -54,18 +54,28 @@ Item { property variant applications: {'' : -1} + function find_app_with_launcher(app_id) { + if (launcher.is_running(app_id)) + return true + + return false + } + function find_app(app, apps) { for (var x in apps) { if (apps[x] == -1) continue - if (x === app) - return true + if (x === app) { + if (find_app_with_launcher(x)) + return true + } } return false } + function set_current_window_app(appid, window) { current_appid = appid current_window = window |