From e0ef7f6f5919d45394635c26c30afb2e7c3d9fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Wed, 29 Aug 2018 13:29:07 +0200 Subject: [PATCH 1/2] main: Factor out the appliction ID --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 591ea68..f74827b 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,8 @@ #include "calls-main-window.h" #include "calls-mm-provider.h" +#define APP_ID "sm.puri.Calls" + static void show_window (GtkApplication *app) { @@ -67,7 +69,7 @@ main (int argc, GtkApplication *app; int status; - app = gtk_application_new ("sm.puri.Calls", G_APPLICATION_FLAGS_NONE); + app = gtk_application_new (APP_ID, G_APPLICATION_FLAGS_NONE); g_signal_connect (app, "activate", G_CALLBACK (show_window), NULL); status = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app); From 7bc5f0ed909780feb60c4887a307443bb26b908b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Wed, 29 Aug 2018 13:29:50 +0200 Subject: [PATCH 2/2] main: Set program name to APP_ID This makes sure we end up with the correct xdg app_id in Wayland: before: [943832,359] -> xdg_toplevel@27.set_app_id("calls") after: [1180814,499] -> xdg_toplevel@27.set_app_id("sm.puri.Calls") Closes #8 --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index f74827b..367c2a7 100644 --- a/src/main.c +++ b/src/main.c @@ -70,6 +70,7 @@ main (int argc, int status; app = gtk_application_new (APP_ID, G_APPLICATION_FLAGS_NONE); + g_set_prgname (APP_ID); g_signal_connect (app, "activate", G_CALLBACK (show_window), NULL); status = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app);