summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkapplication.c')
-rw-r--r--gtk/gtkapplication.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 91b14af558..dd3dd6fd06 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -322,7 +322,25 @@ gtk_application_local_command_line (GApplication *application,
gchar ***arguments,
gint *exit_status)
{
- return G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status);
+ gboolean result;
+
+ result = G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status);
+
+ /* At this point we should know whether the application is registered
+ * as a remote one, in which case we need to make sure that the startup
+ * notification sequence gets completed, if needed, before handing things
+ * over to the primary instance and quitting.
+ */
+ if (g_application_get_is_registered (application) && g_application_get_is_remote (application))
+ {
+ GdkDisplay *display;
+
+ display = gdk_display_get_default ();
+ if (display)
+ gdk_display_notify_startup_complete (display, NULL);
+ }
+
+ return result;
}
static void