diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-06-29 23:54:18 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-06-30 00:03:27 +0300 |
commit | ac31fb66f46233ba55a414296107637a002b2abd (patch) | |
tree | 0cba13b6b54da87977c78e6f6d9f2ffb5c2350b1 | |
parent | 27f1a0931b5374f27a16bdc7f175fd9a1a33665c (diff) |
shell-desktop.h: Avoid mass activation of applications frommarlin_12.90.0marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.0koi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.0jellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.29.99.49.99.39.99.212.90.011.92.011.91.010.93.010.92.010.91.0
application_id event
I failed to realize that the application_id event is sent at binding,
which is not an issue when launcher is the only application running,
but obviously a big one if multiple surfaces are already present, and
launcher is re-started (so not really something we test).
Added also a note to say a few words about that.
We already activate by default surfaces, and we embedded the activation
call-out into the agl_shell_desktop protocol in that tapShortcut QML, so
we don't actually need further handling. This was just a toy example.
Fix indentation while at it.
Bug-AGL: SPEC-3464
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I46889c5fabdb3936089301b92207b896e4c47ae3
-rw-r--r-- | launcher/src/shell-desktop.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/launcher/src/shell-desktop.h b/launcher/src/shell-desktop.h index 4ee77df..fbd053b 100644 --- a/launcher/src/shell-desktop.h +++ b/launcher/src/shell-desktop.h @@ -69,18 +69,21 @@ static void application_id_event(void *data, struct agl_shell_desktop *agl_shell_desktop, const char *app_id) { - Shell *aglShell = static_cast<Shell *>(data); - (void) agl_shell_desktop; + Shell *aglShell = static_cast<Shell *>(data); + (void) agl_shell_desktop; - qInfo() << "app_id: " << app_id; + qInfo() << "app_id: " << app_id; // this ain't necessary in case the default policy API will activate // applications by default (when they are started) but if that is not // the case we can use this event handler to activate the application - // as this event is sent when the application is created (when the - // app surface is created that is) - QString qstr_app_id = QString::fromUtf8(app_id, -1); - aglShell->activate_app(nullptr, qstr_app_id, nullptr); + // as this event is sent when the application is created (when the app + // surface is created that is); note this event is sent when launcher + // binds to the interface for each application present, besides being + // adevertised when the application surface is created; so the + // following will need some kind of filtering to avoid mass activation + //QString qstr_app_id = QString::fromUtf8(app_id, -1); + //aglShell->activate_app(nullptr, qstr_app_id, nullptr); } static void |