From 1a212b0ac1c0a69740f3577e690804c93d093b84 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sat, 3 Jun 2023 13:34:26 -0500 Subject: [PATCH] launcher: Handle GApplication::activate GApplication warns if you do not handle activate. For now this does nothing, typically it would focus the main window of an application, which doesn't apply to many of Cog's platforms. (cherry picked from commit 5976f59ce2403f8db4f6a48d3c29171b5c9d3b85) --- launcher/cog-launcher.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/launcher/cog-launcher.c b/launcher/cog-launcher.c index 38162190..f8ad4e7a 100644 --- a/launcher/cog-launcher.c +++ b/launcher/cog-launcher.c @@ -436,6 +436,14 @@ cog_launcher_startup(GApplication *application) #endif } +static void +cog_launcher_activate(GApplication *application) +{ + /* GApplication warns if activate is not handled. Usually this signal will focus a + window but this doesn't apply to many of our platforms so this is a noop. */ + G_APPLICATION_CLASS(cog_launcher_parent_class)->activate(application); +} + static void cog_launcher_shutdown(GApplication *application) { @@ -1406,6 +1414,7 @@ cog_launcher_class_init(CogLauncherClass *klass) application_class->startup = cog_launcher_startup; application_class->shutdown = cog_launcher_shutdown; application_class->handle_local_options = cog_launcher_handle_local_options; + application_class->activate = cog_launcher_activate; g_object_class_install_property(object_class, PROP_AUTOMATED,