diff --git a/main.c b/main.c index a4bd63fa40b292fa307ad5c3137c59e5adefacd3..a1be78d5f1ce93edf6644b31a66f846ad327059f 100644 --- a/main.c +++ b/main.c @@ -154,7 +154,14 @@ on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data) { - g_message ("on_name_lost() name=%s", name); + AppData *appdata = (AppData*) user_data; + /* this won't happen if this is the only app that tries to take the + * name, because GApplication already have primary instance + * concept. None primary instance will just send 'activate' signal to + * primary instance and exit. They will not try to register ibus at + * all. */ + g_message ("on_name_lost() name=%s exiting", name); + g_application_quit (G_APPLICATION (appdata->app)); } static void