Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libnotify for openSUSE:Factory checked in at 2025-09-30 17:39:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libnotify (Old) and /work/SRC/openSUSE:Factory/.libnotify.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libnotify" Tue Sep 30 17:39:15 2025 rev:49 rq:1307897 version:0.8.7 Changes: -------- --- /work/SRC/openSUSE:Factory/libnotify/libnotify.changes 2025-04-02 17:07:28.698547397 +0200 +++ /work/SRC/openSUSE:Factory/.libnotify.new.11973/libnotify.changes 2025-09-30 17:39:21.317617401 +0200 @@ -1,0 +2,16 @@ +Fri Sep 26 06:41:17 UTC 2025 - Bjørn Lie <[email protected]> + +- Update to version 0.8.7: + + tests: Run non-interactive tests in headless mode + + test-image: Use a local asset instead of relying on invalid + icon theme + + notification: + - Add ability to get a GAppLaunchContext on activation + - Allow using a desktop file as is from a snap if readable + - Do not use the desktop file logic for icons + - Remove app name warning in sandboxes + + notify: + - Ignore the snap UUID to compute the snap application + - Support snap application that contains a dot in their name + +------------------------------------------------------------------- Old: ---- libnotify-0.8.6.obscpio New: ---- libnotify-0.8.7.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libnotify.spec ++++++ --- /var/tmp/diff_new_pack.24SSgR/_old 2025-09-30 17:39:22.157652633 +0200 +++ /var/tmp/diff_new_pack.24SSgR/_new 2025-09-30 17:39:22.161652801 +0200 @@ -1,7 +1,7 @@ # # spec file for package libnotify # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libnotify -Version: 0.8.6 +Version: 0.8.7 Release: 0 Summary: Notifications Library License: LGPL-2.1-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.24SSgR/_old 2025-09-30 17:39:22.201654478 +0200 +++ /var/tmp/diff_new_pack.24SSgR/_new 2025-09-30 17:39:22.205654646 +0200 @@ -3,7 +3,7 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.gnome.org/GNOME/libnotify.git</param> - <param name="revision">0.8.6</param> + <param name="revision">0.8.7</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> ++++++ libnotify-0.8.6.obscpio -> libnotify-0.8.7.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/.gitlab-ci.yml new/libnotify-0.8.7/.gitlab-ci.yml --- old/libnotify-0.8.6/.gitlab-ci.yml 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/.gitlab-ci.yml 2025-09-26 07:20:46.000000000 +0200 @@ -47,20 +47,23 @@ /etc/apt/apt.conf.d/00dt-deb-action-eatmydata - apt-get install -q -y --no-install-recommends + dbus-daemon gobject-introspection - libgdk-pixbuf2.0-dev + libgdk-pixbuf-2.0-dev libgirepository1.0-dev libglib2.0-dev - libgtk-3-dev + libgtk-4-dev libpopt-dev xmlto meson ninja-build python3-pip python3-setuptools + python3-dbusmock xsltproc docbook-xsl-ns gi-docgen + xvfb script: - meson setup ${MESON_BUILD_DIR} -Ddocbook_docs=enabled @@ -88,7 +91,7 @@ - apt-get install -q -y git script: - !reference [".build:ubuntu:base", "script"] - - meson dist -C "${MESON_BUILD_DIR}" --include-subprojects --no-tests + - meson dist -C "${MESON_BUILD_DIR}" --include-subprojects artifacts: name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: "always" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/.gitmodules new/libnotify-0.8.7/.gitmodules --- old/libnotify-0.8.6/.gitmodules 1970-01-01 01:00:00.000000000 +0100 +++ new/libnotify-0.8.7/.gitmodules 2025-09-26 07:20:46.000000000 +0200 @@ -0,0 +1,3 @@ +[submodule "subprojects/gi-docgen"] + path = subprojects/gi-docgen + url = https://gitlab.gnome.org/GNOME/gi-docgen.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/NEWS new/libnotify-0.8.7/NEWS --- old/libnotify-0.8.6/NEWS 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/NEWS 2025-09-26 07:20:46.000000000 +0200 @@ -1,3 +1,23 @@ +New in 0.8.7 +============ + +This is release contains bugfixes when used within a snap and a new API to +get a Gio.AppLaunchContext that can be used to launch applications with an +action activation token. + +* ci: Enable tests again (adding new dependencies) [Marco] +* tests: Run non-interactive tests in headless mode [Marco] +* test-image: Use a local asset instead of relying on invalid icon theme [Marco] +* notification: Add ability to get a GAppLaunchContext on activation [Marco] +* notify: Ignore the snap UUID to compute the snap application [Marco] +* notify: Support snap application that contains a dot in their name [Marco] +* notification: Allow using a desktop file as is from a snap if readable [Marco] +* notification: Do not use the desktop file logic for icons [Marco] +* notification: Remove app name warning in sandboxes [Maximiliano] + +Contributors: + Marco Trevisan, Maximiliano Sandoval + New in 0.8.6 ============ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/libnotify/launch-context.c new/libnotify-0.8.7/libnotify/launch-context.c --- old/libnotify-0.8.6/libnotify/launch-context.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libnotify-0.8.7/libnotify/launch-context.c 2025-09-26 07:20:46.000000000 +0200 @@ -0,0 +1,68 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* Copyright 2025 Canonical Ltd */ +/* Author: Alessandro Astone, Marco Trevisan */ + +#include "launch-context.h" + +struct _NotificationAppLaunchContext +{ + GAppLaunchContext parent_instance; + + char *activation_token; +}; + +G_DEFINE_TYPE (NotificationAppLaunchContext, + notification_app_launch_context, + G_TYPE_APP_LAUNCH_CONTEXT); + +GAppLaunchContext * +notification_app_launch_context_new (NotifyNotification *notification) +{ + NotificationAppLaunchContext *self; + const char *activation_token; + + activation_token = notify_notification_get_activation_token (notification); + if (!activation_token) { + return NULL; + } + + self = g_object_new (notification_app_launch_context_get_type (), NULL); + self->activation_token = g_strdup (activation_token); + + return G_APP_LAUNCH_CONTEXT (self); +} + +static void +notification_app_launch_context_init (NotificationAppLaunchContext *self) +{} + +static void +notification_app_launch_context_finalize (GObject *object) +{ + NotificationAppLaunchContext *self = NOTIFICATION_APP_LAUNCH_CONTEXT (object); + + g_clear_pointer (&self->activation_token, g_free); + + G_OBJECT_CLASS (notification_app_launch_context_parent_class)->finalize (object); +} + +static char * +notification_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, + GAppInfo *, + GList *) +{ + NotificationAppLaunchContext *self = NOTIFICATION_APP_LAUNCH_CONTEXT (context); + + return g_strdup (self->activation_token); +} + +static void +notification_app_launch_context_class_init (NotificationAppLaunchContextClass *klass) +{ + GAppLaunchContextClass *context_class = G_APP_LAUNCH_CONTEXT_CLASS (klass); + GObjectClass* object_class = G_OBJECT_CLASS (klass); + + context_class->get_startup_notify_id = notification_app_launch_context_get_startup_notify_id; + object_class->finalize = notification_app_launch_context_finalize; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/libnotify/launch-context.h new/libnotify-0.8.7/libnotify/launch-context.h --- old/libnotify-0.8.6/libnotify/launch-context.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libnotify-0.8.7/libnotify/launch-context.h 2025-09-26 07:20:46.000000000 +0200 @@ -0,0 +1,15 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* Copyright 2025 Canonical Ltd */ +/* Authors: Alessandro Astone, Marco Trevisan */ + +#pragma once + +#include <gio/gio.h> +#include "notification.h" + +G_DECLARE_FINAL_TYPE (NotificationAppLaunchContext, + notification_app_launch_context, + NOTIFICATION, APP_LAUNCH_CONTEXT, GAppLaunchContext); + +GAppLaunchContext *notification_app_launch_context_new (NotifyNotification *notification); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/libnotify/meson.build new/libnotify-0.8.7/libnotify/meson.build --- old/libnotify-0.8.6/libnotify/meson.build 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/libnotify/meson.build 2025-09-26 07:20:46.000000000 +0200 @@ -11,6 +11,10 @@ 'notification.c', ] +private_sources = [ + 'launch-context.c', +] + features_data = configuration_data() features_data.set('LIBNOTIFY_MAJOR_VERSION', VERSION_ARRAY[0]) features_data.set('LIBNOTIFY_MINOR_VERSION', VERSION_ARRAY[1]) @@ -55,7 +59,12 @@ libnotify_lib = shared_library(LIBNAME, dependencies: notify_dep, - sources: sources + enum_types + marshal, + sources: [ + sources, + enum_types, + marshal, + private_sources, + ], version: '@0@.@1@.@2@'.format(LT_CURRENT, LT_REVISION, LT_AGE), soversion: LT_CURRENT, install: true, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/libnotify/notification.c new/libnotify-0.8.7/libnotify/notification.c --- old/libnotify-0.8.6/libnotify/notification.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/libnotify/notification.c 2025-09-26 07:20:46.000000000 +0200 @@ -24,9 +24,11 @@ #include "config.h" #include <gio/gio.h> +#include <gio/gdesktopappinfo.h> #include "notify.h" #include "internal.h" +#include "launch-context.h" #if !defined(G_PARAM_STATIC_NAME) && !defined(G_PARAM_STATIC_NICK) && \ !defined(G_PARAM_STATIC_BLURB) @@ -573,6 +575,16 @@ if (ret == NULL && _notify_get_snap_name () != NULL && strchr (desktop, G_DIR_SEPARATOR) == NULL) { + g_autoptr(GDesktopAppInfo) app_info = NULL; + g_autofree char *desktop_id = NULL; + + desktop_id = g_strconcat (desktop, ".desktop", NULL); + if ((app_info = g_desktop_app_info_new (desktop_id))) { + /* Just return the desktop file if it's usable. */ + g_clear_object (&app_info); + return NULL; + } + ret = g_strdup_printf ("%s_%s", _notify_get_snap_name (), desktop); } @@ -617,8 +629,7 @@ g_free (priv->icon_name); priv->icon_name = (icon != NULL && *icon != '\0' ? g_strdup (icon) : NULL); - snapped_icon = try_prepend_snap_desktop (notification, - priv->icon_name); + snapped_icon = try_prepend_snap (notification, priv->icon_name); if (snapped_icon != NULL) { g_debug ("Icon updated in snap environment: '%s' -> '%s'\n", priv->icon_name, snapped_icon); @@ -1518,7 +1529,7 @@ g_return_if_fail (NOTIFY_IS_NOTIFICATION (notification)); - if (maybe_warn_portal_unsupported_feature ("App Name")) { + if (_notify_uses_portal_notifications ()) { return; } @@ -1819,6 +1830,38 @@ return priv->activation_token; } +/** + * notify_notification_get_activation_app_launch_context: + * @notification: The notification. + * + * Gets an application launch context for the notification action + * activation. + * + * If an an action is currently being activated, gets a + * a [[email protected]] that can be used to launch applications using + * the current activation token (see [[email protected]_activation_token]). + * + * This function is intended to be used in a [callback@ActionCallback] to get + * the launch context for the activated action, if the notification daemon + * supports it. + * + * Returns: (nullable) (transfer full): The [[email protected]] for + * the current activation token, or %NULL if unset + * + * Since: 0.8.7 + */ +GAppLaunchContext * +notify_notification_get_activation_app_launch_context (NotifyNotification *notification) +{ + NotifyNotificationPrivate *priv = + notify_notification_get_instance_private (notification); + + g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), NULL); + g_return_val_if_fail (priv->activating, NULL); + + return notification_app_launch_context_new (notification); +} + gboolean _notify_notification_has_nondefault_actions (const NotifyNotification *n) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/libnotify/notification.h new/libnotify-0.8.7/libnotify/notification.h --- old/libnotify-0.8.6/libnotify/notification.h 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/libnotify/notification.h 2025-09-26 07:20:46.000000000 +0200 @@ -205,6 +205,8 @@ const char *notify_notification_get_activation_token (NotifyNotification *notification); +GAppLaunchContext *notify_notification_get_activation_app_launch_context (NotifyNotification *notification); + void notify_notification_clear_actions (NotifyNotification *notification); gboolean notify_notification_close (NotifyNotification *notification, GError **error); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/libnotify/notify.c new/libnotify-0.8.7/libnotify/notify.c --- old/libnotify-0.8.6/libnotify/notify.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/libnotify/notify.c 2025-09-26 07:20:46.000000000 +0200 @@ -281,7 +281,9 @@ } if (g_str_equal (ns[1], _snap_name)) { - _snap_app = g_strdup (ns[2]); + /* Discard the last namespace, being the extension. */ + g_clear_pointer (&ns[ns_length-1], g_free); + _snap_app = g_strjoinv (".", &ns[2]); g_strfreev (ns); break; } @@ -297,6 +299,14 @@ if (_snap_app == NULL) { _snap_app = g_strdup (_snap_name); + } else if (strchr (_snap_app, '-')) { + const char *snap_uuid; + + /* Snapd appends now an UUID to the app name so let's drop it. */ + snap_uuid = _snap_app + strlen(_snap_app) - 36 /* UUID length */; + if (snap_uuid > _snap_app + 1 && g_uuid_string_is_valid (snap_uuid)) { + *((char *) snap_uuid-1) = '\0'; + } } g_debug ("SNAP app: %s", _snap_app); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/meson.build new/libnotify-0.8.7/meson.build --- old/libnotify-0.8.6/meson.build 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/meson.build 2025-09-26 07:20:46.000000000 +0200 @@ -1,10 +1,12 @@ project('libnotify', 'c', - version: '0.8.6', - meson_version: '>= 0.56.0') + version: '0.8.7', + meson_version: '>= 0.64.0') +fs = import('fs') gnome = import('gnome') pkgconfig = import('pkgconfig') +python = import('python') cc = meson.get_compiler('c') @@ -44,9 +46,10 @@ gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0') glib_dep = dependency('glib-2.0', version: glib_req_version) gio_dep = dependency('gio-2.0', version: glib_req_version) -gtk_dep = dependency('gtk+-3.0', version: '>= 2.90', required: get_option('tests')) +gio_unix_dep = dependency('gio-unix-2.0', version: glib_req_version) +gtk_dep = dependency('gtk4', version: '>= 4.0', required: get_option('tests')) -libnotify_deps = [gdk_pixbuf_dep, gio_dep, glib_dep] +libnotify_deps = [gdk_pixbuf_dep, gio_dep, glib_dep, gio_unix_dep] tests_deps = [gtk_dep] conf = configuration_data() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tests/meson.build new/libnotify-0.8.7/tests/meson.build --- old/libnotify-0.8.6/tests/meson.build 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tests/meson.build 2025-09-26 07:20:46.000000000 +0200 @@ -1,28 +1,63 @@ -test_progs = [ - 'replace', - 'replace-widget', - 'server-info', - 'default-action', - 'multi-actions', - 'action-icons', - 'image', - 'basic', - 'error', - 'markup', - 'persistence', - 'removal', - 'resident', - 'rtl', - 'size-changes', - 'transient', - 'urgency', - 'xy', - 'xy-actions', - 'xy-stress', -] +test_env = environment() +test_env.set('G_DEBUG', 'fatal-criticals') -foreach tprog: test_progs - test('test-' + tprog, executable('test-' + tprog, ['test-' + tprog + '.c'], +dbus_run_session = find_program('dbus-run-session', required: false) +py = python.find_installation('python3', modules: 'dbusmock', required: false) +xvfb_run = find_program('xvfb-run', required: false) + +if not dbus_run_session.found() or not py.found() + subdir_done() +endif + +add_test_setup( + 'default', + is_default: true, + exclude_suites: ['interactive'] + (xvfb_run.found() ? [] : ['graphical']), + exe_wrapper: [ + xvfb_run.found() ? [xvfb_run, '-a'] : [], + dbus_run_session, '--', + py, '-m', 'dbusmock', '--session', '-t', 'notification_daemon', '-e', + ], + env: test_env, +) + +test_progs = { + 'replace': {}, + 'replace-widget': {'suites': 'interactive'}, + 'server-info': {}, + 'default-action': {'suites': 'interactive'}, + 'multi-actions': {'suites': 'interactive'}, + 'action-icons': {'suites': 'interactive'}, + 'image': { + 'suites': 'graphical', + 'depends': [ + fs.copyfile(files('applet-critical.png'), 'applet-critical.png'), + fs.copyfile(files('dewdop_leaf.jpg'), 'dewdop_leaf.jpg'), + ], + }, + 'basic': {}, + 'error': {}, + 'markup': {}, + 'persistence': {'suites': 'graphical'}, + 'removal': {'suites': 'interactive'}, + 'resident': {'suites': 'interactive'}, + 'rtl': {}, + 'size-changes': {}, + 'transient': {'suites': 'interactive'}, + 'urgency': {}, + 'xy': {}, + 'xy-actions': {'suites': 'interactive'}, + 'xy-stress': {'suites': 'interactive'}, +} + +foreach tprog, tprop: test_progs + t = executable('test-' + tprog, ['test-' + tprog + '.c'], dependencies: [libnotify_dep, tests_deps], - )) + ) + + test('test-' + tprog, t, + suite: tprop.get('suites', []), + depends: tprop.get('depends', []), + workdir: meson.current_build_dir(), + ) endforeach diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tests/test-image.c new/libnotify-0.8.7/tests/test-image.c --- old/libnotify-0.8.6/tests/test-image.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tests/test-image.c 2025-09-26 07:20:46.000000000 +0200 @@ -43,7 +43,7 @@ char *uri; GdkPixbuf *pixbuf; - gtk_init (&argc, &argv); + gtk_init (); if (!notify_init ("Images Test")) exit (1); @@ -84,11 +84,9 @@ n = notify_notification_new ("Raw image test", "Testing sending raw pixbufs", NULL); - pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_for_screen (gdk_screen_get_default ()), - "folder-open", - 48, - GTK_ICON_LOOKUP_USE_BUILTIN, - NULL); + + pixbuf = gdk_pixbuf_new_from_file ("applet-critical.png", NULL); + if (pixbuf == NULL) { fprintf (stderr, "failed to render pixbuf\n"); return 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tests/test-persistence.c new/libnotify-0.8.7/tests/test-persistence.c --- old/libnotify-0.8.6/tests/test-persistence.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tests/test-persistence.c 2025-09-26 07:20:46.000000000 +0200 @@ -53,8 +53,6 @@ g_assert (strcmp (action, "install") == 0); printf ("You clicked Install\n"); - - gtk_main_quit (); } int @@ -62,7 +60,7 @@ { NotifyNotification *n; - gtk_init (&argc, &argv); + gtk_init (); notify_init ("Persistence Test"); n = notify_notification_new ("Software Updates Available", @@ -79,16 +77,10 @@ notify_notification_show (n, NULL); if (!server_has_persistence ()) { - GtkStatusIcon *icon; g_message ("Server does not support persistence; using a status icon"); - icon = gtk_status_icon_new_from_icon_name ("software-update-available-symbolic"); - gtk_status_icon_set_tooltip_markup (icon, "<b>Software Updates Available</b>\nImportant updates for your apps are now available."); - gtk_status_icon_set_visible (icon, TRUE); } else { g_message ("Server supports persistence; status icon not needed"); } - gtk_main (); - return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tests/test-removal.c new/libnotify-0.8.7/tests/test-removal.c --- old/libnotify-0.8.6/tests/test-removal.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tests/test-removal.c 2025-09-26 07:20:46.000000000 +0200 @@ -20,6 +20,8 @@ #include <libnotify/notify.h> #include <gtk/gtk.h> +static GMainLoop *loop; + static void next_callback (NotifyNotification *n, const char *action) @@ -30,7 +32,7 @@ notify_notification_close (n, NULL); - gtk_main_quit (); + g_main_loop_quit (loop); } int @@ -38,7 +40,7 @@ { NotifyNotification *n; - gtk_init (&argc, &argv); + loop = g_main_loop_new (NULL, FALSE); notify_init ("Urgency"); @@ -104,7 +106,7 @@ exit (1); } - gtk_main (); + g_main_loop_run (loop); g_object_unref (G_OBJECT (n)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tests/test-replace-widget.c new/libnotify-0.8.7/tests/test-replace-widget.c --- old/libnotify-0.8.6/tests/test-replace-widget.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tests/test-replace-widget.c 2025-09-26 07:20:46.000000000 +0200 @@ -25,13 +25,12 @@ static int count = 0; static void -on_exposed (GtkWidget *widget, - GdkEventExpose *ev, - void *user_data) +on_mapped (GtkWidget *widget, + void *user_data) { NotifyNotification *n = NOTIFY_NOTIFICATION (user_data); - g_signal_handlers_disconnect_by_func (widget, on_exposed, user_data); + g_signal_handlers_disconnect_by_func (widget, on_mapped, user_data); notify_notification_show (n, NULL); } @@ -58,19 +57,18 @@ GtkWidget *window; GtkWidget *button; - gtk_init (&argc, &argv); + gtk_init (); notify_init ("Replace Test"); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (G_OBJECT (window), "delete_event", - G_CALLBACK (gtk_main_quit), + G_CALLBACK (gtk_window_destroy), NULL); button = gtk_button_new_with_label ("click here to change notification"); - gtk_container_add (GTK_CONTAINER (window), button); - gtk_widget_show_all (window); + gtk_window_set_child (GTK_WINDOW (window), button); n = notify_notification_new ("Widget Attachment Test", "Button has not been clicked yet", @@ -83,11 +81,12 @@ G_CALLBACK (on_clicked), n); g_signal_connect_after (G_OBJECT (button), - "expose-event", - G_CALLBACK (on_exposed), + "map", + G_CALLBACK (on_mapped), n); - gtk_main (); + while (g_list_model_get_n_items (gtk_window_get_toplevels ()) > 0) + g_main_context_iteration (NULL, TRUE); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tests/test-xy-stress.c new/libnotify-0.8.7/tests/test-xy-stress.c --- old/libnotify-0.8.6/tests/test-xy-stress.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tests/test-xy-stress.c 2025-09-26 07:20:46.000000000 +0200 @@ -21,7 +21,7 @@ */ #include <libnotify/notify.h> -#include <gdk/gdk.h> +#include <gtk/gtk.h> #include <stdio.h> #include <unistd.h> @@ -61,18 +61,18 @@ _popup_random_bubble (gpointer unused) { GdkDisplay *display; - GdkScreen *screen; - - int screen_x2, screen_y2; + GListModel *monitors; + GdkMonitor *monitor; + GdkRectangle rect; int x, y; display = gdk_display_get_default (); - screen = gdk_display_get_default_screen (display); - screen_x2 = gdk_screen_get_width (screen) - 1; - screen_y2 = gdk_screen_get_height (screen) - 1; + monitors = gdk_display_get_monitors (display); + monitor = g_list_model_get_item (monitors, 0); + gdk_monitor_get_geometry (monitor, &rect); - x = g_random_int_range (0, screen_x2); - y = g_random_int_range (0, screen_y2); + x = g_random_int_range (rect.x, rect.x + rect.width - 1); + y = g_random_int_range (rect.y, rect.y + rect.height - 1); emit_notification (x, y); return TRUE; @@ -83,7 +83,7 @@ { GMainLoop *loop; - gdk_init (&argc, &argv); + gtk_init (); notify_init ("XY"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnotify-0.8.6/tools/notify-send.c new/libnotify-0.8.7/tools/notify-send.c --- old/libnotify-0.8.6/tools/notify-send.c 2025-03-28 17:18:04.000000000 +0100 +++ new/libnotify-0.8.7/tools/notify-send.c 2025-09-26 07:20:46.000000000 +0200 @@ -168,13 +168,18 @@ gpointer user_data) { const char *action_name = user_data; - const char *activation_token; + g_autoptr(GAppLaunchContext) launch_context = NULL; - activation_token = notify_notification_get_activation_token (notify); + launch_context = notify_notification_get_activation_app_launch_context (notify); g_printf ("%s\n", action_name); - if (activation_token) { + if (launch_context) { + g_autofree char *activation_token = NULL; + + activation_token = + g_app_launch_context_get_startup_notify_id (launch_context, + NULL, NULL); g_debug ("Activation Token: %s", activation_token); } @@ -477,7 +482,7 @@ G_CALLBACK (handle_closed), NULL); - if (expire_timeout > 0) { + if (expire_timeout != NOTIFY_EXPIRES_NEVER) { g_timeout_add (expire_timeout, on_wait_timeout, NULL); } } ++++++ libnotify.obsinfo ++++++ --- /var/tmp/diff_new_pack.24SSgR/_old 2025-09-30 17:39:22.457665215 +0200 +++ /var/tmp/diff_new_pack.24SSgR/_new 2025-09-30 17:39:22.461665383 +0200 @@ -1,5 +1,5 @@ name: libnotify -version: 0.8.6 -mtime: 1743178684 -commit: 131aad01ff5f563b4863becbb6ed84dac6e75d5a +version: 0.8.7 +mtime: 1758864046 +commit: 1d9767a392cbac7e899e7ab80235cfceebd52731
