From d85ad74524cbbc5260d4e2fd5745d01eaceed771 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 13 Dec 2024 10:25:21 +0800 Subject: [PATCH] Init libnotify --- src/PYMain.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/PYMain.cc b/src/PYMain.cc index 5b1dfbf9..7a2e2045 100644 --- a/src/PYMain.cc +++ b/src/PYMain.cc @@ -38,6 +38,9 @@ #include "PYTableDatabase.h" #endif #include "PYXMLUtil.h" +#ifdef ENABLE_LIBNOTIFY +#include +#endif using namespace PY; @@ -263,6 +266,18 @@ main (gint argc, gchar **argv) ::signal (SIGINT, sigterm_cb); atexit (atexit_cb); +#ifdef ENABLE_LIBNOTIFY + if (!notify_init("ibus-libpinyin")) { + g_error("notify_init failed"); + exit(1); + } +#endif + start_component (); + +#ifdef ENABLE_LIBNOTIFY + notify_uninit(); +#endif + return 0; }