diff options
author | Arnaud Ferraris <arnaud.ferraris@collabora.com> | 2022-01-12 16:37:05 +0100 |
---|---|---|
committer | Arnaud Ferraris <arnaud.ferraris@collabora.com> | 2022-01-12 16:37:05 +0100 |
commit | c84836ec5ddaf2d0e91c46713475c35652bb540f (patch) | |
tree | 39ce56450054694af698e9cf9aab17126c6655f4 | |
parent | 385b3fa50ce2dd299645eda768c08c8beb6905ec (diff) |
app_launcher: emit "started" signal for running appsmarlin_12.93.0marlin_12.92.0marlin/12.93.0marlin/12.92.0lamprey_12.1.4lamprey_12.1.3lamprey_12.1.2lamprey_12.1.1lamprey/12.1.4lamprey/12.1.3lamprey/12.1.2lamprey/12.1.112.93.012.92.012.1.412.1.312.1.212.1.1
Due to an error in how running apps were handled, applaunchd would emit
the "started" signal for D-Bus-activated apps only. This change ensures
the signal is emitted for all running apps, regardless of how they were
started.
Bug-AGL: SPEC-4160
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Change-Id: Ibd88223931b51de6c732985c8b886d06886769d5
-rw-r--r-- | src/app_launcher.c | 5 | ||||
-rw-r--r-- | src/dbus_activation_manager.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/app_launcher.c b/src/app_launcher.c index ddb55c8..5c9bddb 100644 --- a/src/app_launcher.c +++ b/src/app_launcher.c @@ -38,6 +38,10 @@ G_DEFINE_TYPE_WITH_CODE(AppLauncher, app_launcher, G_IMPLEMENT_INTERFACE(APPLAUNCHD_TYPE_APP_LAUNCH, app_launcher_iface_init)); +static void app_launcher_started_cb(AppLauncher *self, + const gchar *app_id, + gpointer caller); + /* * Internal functions */ @@ -215,6 +219,7 @@ static gboolean app_launcher_start_app(AppLauncher *self, AppInfo *app_info) */ if (app_info_get_dbus_activated(app_info)) dbus_activation_manager_activate_app(self->dbus_manager, app_info); + app_launcher_started_cb(self, app_id, NULL); return TRUE; case APP_STATUS_INACTIVE: if (app_info_get_dbus_activated(app_info)) diff --git a/src/dbus_activation_manager.c b/src/dbus_activation_manager.c index 3c31ee6..8c65485 100644 --- a/src/dbus_activation_manager.c +++ b/src/dbus_activation_manager.c @@ -139,6 +139,7 @@ static void dbus_activation_manager_app_started_cb(GDBusConnection *connection, g_debug("Application '%s' appeared on D-Bus", name); app_info_set_status(app_info, APP_STATUS_RUNNING); dbus_activation_manager_activate_app(self, app_info); + g_signal_emit(self, signals[STARTED], 0, app_info_get_app_id(app_info)); } /* @@ -240,8 +241,6 @@ gboolean dbus_activation_manager_activate_app(DBusActivationManager *self, error->message); } - g_signal_emit(self, signals[STARTED], 0, app_id); - return TRUE; } |