From 6797b6302d9a6b955b3123b186471e8b3319a6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 27 Jul 2024 10:38:59 +0200 Subject: [PATCH 1/2] feedback-manager: Ack libfeeback unstable API in meson MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids cluttering the code with multiple defines Signed-off-by: Guido Günther Part-of: --- meson.build | 1 + src/feedback-manager.c | 1 - src/notifications/notify-feedback.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index ab1030c62..3ecc7765d 100644 --- a/meson.build +++ b/meson.build @@ -46,6 +46,7 @@ add_project_arguments([ '-DGLIB_VERSION_MAX_REQUIRED=@0@'.format(glib_ver_str), '-DG_LOG_USE_STRUCTURED', '-DGMOBILE_USE_UNSTABLE_API', + '-DLIBFEEDBACK_USE_UNSTABLE_API', ], language: 'c') root_inc = include_directories('.') diff --git a/src/feedback-manager.c b/src/feedback-manager.c index cda302d2d..dd1f55eb0 100644 --- a/src/feedback-manager.c +++ b/src/feedback-manager.c @@ -13,7 +13,6 @@ #include "feedback-manager.h" #include "shell.h" -#define LIBFEEDBACK_USE_UNSTABLE_API #include /** diff --git a/src/notifications/notify-feedback.c b/src/notifications/notify-feedback.c index b0dcc63e6..b521922d9 100644 --- a/src/notifications/notify-feedback.c +++ b/src/notifications/notify-feedback.c @@ -15,7 +15,6 @@ #include "notification-source.h" #include "util.h" -#define LIBFEEDBACK_USE_UNSTABLE_API #include #include -- GitLab From a09d9de370950413d102883d5b17c14ea8bdc518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 27 Jul 2024 10:37:10 +0200 Subject: [PATCH 2/2] main: Init libfeedback early MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This moves all library inits to single place and avoids a end_notify_feedback: assertion 'lfb_is_initted ()' failed warning on startup. We can ignore all error handling as the feedback manager will try reinitialization later on anyway. Signed-off-by: Guido Günther Part-of: --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index a9afe142b..4b86e8197 100644 --- a/src/main.c +++ b/src/main.c @@ -16,8 +16,9 @@ #include "wall-clock.h" #include "background-cache.h" -#include #include +#include +#include #include #include @@ -130,6 +131,7 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); hdy_init (); cui_init (TRUE); + lfb_init (PHOSH_APP_ID, NULL); g_unix_signal_add (SIGTERM, on_shutdown_signal, NULL); g_unix_signal_add (SIGINT, on_shutdown_signal, NULL); -- GitLab