aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Ferraris <arnaud.ferraris@collabora.com>2022-01-12 16:37:05 +0100
committerArnaud Ferraris <arnaud.ferraris@collabora.com>2022-01-12 16:37:05 +0100
commitc84836ec5ddaf2d0e91c46713475c35652bb540f (patch)
tree39ce56450054694af698e9cf9aab17126c6655f4
parent385b3fa50ce2dd299645eda768c08c8beb6905ec (diff)
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.c5
-rw-r--r--src/dbus_activation_manager.c3
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;
}