mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
...
This commit is contained in:
3
glfw/linux_notify.c
vendored
3
glfw/linux_notify.c
vendored
@@ -69,9 +69,10 @@ glfw_dbus_send_user_notification(const char *app_name, const char* icon, const c
|
|||||||
static DBusConnection *added_signal_match = NULL;
|
static DBusConnection *added_signal_match = NULL;
|
||||||
if (!session_bus) return 0;
|
if (!session_bus) return 0;
|
||||||
if (added_signal_match != session_bus) {
|
if (added_signal_match != session_bus) {
|
||||||
dbus_bus_add_match(session_bus, "type='signal',interface='org.freedesktop.Notifications.ActionInvoked'", NULL);
|
dbus_bus_add_match(session_bus, "type='signal',interface='org.freedesktop.Notifications'", NULL);
|
||||||
static DBusObjectPathVTable vtable = {.message_function = message_handler};
|
static DBusObjectPathVTable vtable = {.message_function = message_handler};
|
||||||
dbus_connection_try_register_object_path(session_bus, NOTIFICATIONS_PATH, &vtable, NULL, NULL);
|
dbus_connection_try_register_object_path(session_bus, NOTIFICATIONS_PATH, &vtable, NULL, NULL);
|
||||||
|
added_signal_match = session_bus;
|
||||||
}
|
}
|
||||||
NotificationCreatedData *data = malloc(sizeof(NotificationCreatedData));
|
NotificationCreatedData *data = malloc(sizeof(NotificationCreatedData));
|
||||||
data->next_id = ++notification_id;
|
data->next_id = ++notification_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user