Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mako for openSUSE:Factory checked in at 2026-03-31 15:22:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mako (Old) and /work/SRC/openSUSE:Factory/.mako.new.1999 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mako" Tue Mar 31 15:22:44 2026 rev:12 rq:1343746 version:1.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/mako/mako.changes 2025-03-17 22:21:32.620380265 +0100 +++ /work/SRC/openSUSE:Factory/.mako.new.1999/mako.changes 2026-03-31 15:23:50.620205711 +0200 @@ -1,0 +2,8 @@ +Mon Mar 30 17:39:42 UTC 2026 - Michael Vetter <[email protected]> + +- Update to 1.11.0: + * JSON output for makoctl list and makoctl history. + * A new Notifications D-Bus property can be used to be notified when the + notification list changes. + +------------------------------------------------------------------- Old: ---- v1.10.0.tar.gz New: ---- v1.11.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mako.spec ++++++ --- /var/tmp/diff_new_pack.lF8Mss/_old 2026-03-31 15:23:51.404238373 +0200 +++ /var/tmp/diff_new_pack.lF8Mss/_new 2026-03-31 15:23:51.404238373 +0200 @@ -1,7 +1,7 @@ # # spec file for package mako # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 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: mako -Version: 1.10.0 +Version: 1.11.0 Release: 0 Summary: A Wayland notification daemon License: MIT ++++++ v1.10.0.tar.gz -> v1.11.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/README.md new/mako-1.11.0/README.md --- old/mako-1.10.0/README.md 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/README.md 2026-03-26 18:31:47.000000000 +0100 @@ -8,7 +8,7 @@ mako implements the [FreeDesktop Notifications Specification][spec]. -Feel free to join the IRC channel: #emersion on irc.libera.chat. +Feel free to join the IRC channel: [#emersion on irc.libera.chat][irc]. ## Running @@ -66,5 +66,6 @@ MIT +[irc]: https://web.libera.chat/gamja/#emersion [spec]: https://specifications.freedesktop.org/notification-spec/latest/ [basu]: https://github.com/emersion/basu diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/contrib/completions/bash/makoctl new/mako-1.11.0/contrib/completions/bash/makoctl --- old/mako-1.10.0/contrib/completions/bash/makoctl 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/contrib/completions/bash/makoctl 2026-03-26 18:31:47.000000000 +0100 @@ -13,7 +13,7 @@ 'list' 'history' 'reload' - 'set-mode' + 'mode' 'help' '-h' '--help' @@ -26,7 +26,7 @@ case $prev in dismiss) - COMPREPLY=($(compgen -W "-a --all -g --group -n" -- "$cur")) + COMPREPLY=($(compgen -W "-a --all -g --group -h --no-history -n" -- "$cur")) return ;; invoke) @@ -37,6 +37,10 @@ COMPREPLY=($(compgen -c -W "-n" -- "$cur")) return ;; + mode) + COMPREPLY=($(compgen -W "-a -r -t -s" -- "$cur")) + return + ;; esac if [[ "${COMP_WORDS[COMP_CWORD-3]}" == "menu" ]]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/contrib/completions/fish/makoctl.fish new/mako-1.11.0/contrib/completions/fish/makoctl.fish --- old/mako-1.10.0/contrib/completions/fish/makoctl.fish 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/contrib/completions/fish/makoctl.fish 2026-03-26 18:31:47.000000000 +0100 @@ -1,6 +1,6 @@ function __fish_makoctl_complete_no_subcommand for i in (commandline -opc) - if contains -- $i dismiss restore invoke menu list reload help + if contains -- $i dismiss restore invoke menu list reload mode help return 1 end end @@ -14,12 +14,18 @@ complete -c makoctl -n '__fish_makoctl_complete_no_subcommand' -a list -d 'List notifications' -x complete -c makoctl -n '__fish_makoctl_complete_no_subcommand' -a history -d 'List history' -x complete -c makoctl -n '__fish_makoctl_complete_no_subcommand' -a reload -d 'Reload the configuration file' -x +complete -c makoctl -n '__fish_makoctl_complete_no_subcommand' -a mode -d 'List, activate, or deactivate modes' -x complete -c makoctl -n '__fish_makoctl_complete_no_subcommand' -a help -d 'Show help message and quit' -x complete -c makoctl -n '__fish_seen_subcommand_from dismiss' -s a -l all -d "Dismiss all notifications" -x complete -c makoctl -n '__fish_seen_subcommand_from dismiss' -s g -l group -d "Dismiss all the notifications in the last notification's group" -x +complete -c makoctl -n '__fish_seen_subcommand_from dismiss' -s h -l no-history -d "Dismiss without adding to history" -x complete -c makoctl -n '__fish_seen_subcommand_from dismiss' -s n -d "Dismiss the notification with the given id" -x complete -c makoctl -n '__fish_seen_subcommand_from invoke' -s n -d "Invoke an action on the notification with the given id" -x complete -c makoctl -n '__fish_seen_subcommand_from menu' -s n -d "Use a program to select one action on the notification with the given id" -x complete -c makoctl -n '__fish_seen_subcommand_from menu' -a "(__fish_complete_command)" -x +complete -c makoctl -n '__fish_seen_subcommand_from mode' -s a -d "Add mode" -x +complete -c makoctl -n '__fish_seen_subcommand_from mode' -s r -d "Remove mode" -x +complete -c makoctl -n '__fish_seen_subcommand_from mode' -s t -d "Toggle mode" -x +complete -c makoctl -n '__fish_seen_subcommand_from mode' -s s -d "Set mode" -x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/contrib/completions/zsh/_makoctl new/mako-1.11.0/contrib/completions/zsh/_makoctl --- old/mako-1.10.0/contrib/completions/zsh/_makoctl 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/contrib/completions/zsh/_makoctl 2026-03-26 18:31:47.000000000 +0100 @@ -6,9 +6,11 @@ 'dismiss:Dismiss notification (first by default)' 'restore:Restore the most recently expired notification from the history buffer' 'invoke:Invoke an action on the first notification. If action is not specified, invoke the default action' + 'menu:Use a program to select one action to be invoked on the notification' 'list:Retrieve a list of current notifications' 'history:Retrieve a list of dismissed notifications' 'reload:Reload the configuration file' + 'mode:List, activate, or deactivate modes' 'help:Show help message and quit' ) @@ -23,10 +25,27 @@ case "${opt}" in dismiss) _arguments -s \ - '(-a --all)'{-a,--all}'[Dimiss all notification]' + '(-a --all)'{-a,--all}'[Dismiss all notifications]' \ + '(-g --group)'{-g,--group}'[Dismiss all the notifications in the last notification'\''s group]' \ + '(-h --no-history)'{-h,--no-history}'[Dismiss without adding to history]' \ + '-n[Dismiss the notification with the given id]:id:' ;; invoke) - _message -e action 'action' + _arguments -s \ + '-n[Invoke an action on the notification with the given id]:id:' \ + '*:action:' + ;; + menu) + _arguments -s \ + '-n[Use a program to select one action on the notification with the given id]:id:' \ + '*:prog and args:_command_names -e' + ;; + mode) + _arguments -s \ + '*-a[Add mode]:mode:' \ + '*-r[Remove mode]:mode:' \ + '*-t[Toggle mode]:mode:' \ + '*-s[Set mode]:mode:' ;; esac fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/contrib/openrc-user.init new/mako-1.11.0/contrib/openrc-user.init --- old/mako-1.10.0/contrib/openrc-user.init 1970-01-01 01:00:00.000000000 +0100 +++ new/mako-1.11.0/contrib/openrc-user.init 2026-03-26 18:31:47.000000000 +0100 @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +description="Lightweight Wayland notification daemon" + +supervisor="supervise-daemon" +command="/usr/bin/mako" + +depend() { + need dbus + provide notification-daemon +} + +start_pre() { + if [ -z "$WAYLAND_DISPLAY" ]; then + eerror "\$WAYLAND_DISPLAY unset, can't proceed." + return 1 + fi +} + +extra_started_commands="reload" +description_reload="Reload mako configuration using makoctl" +reload() { + makoctl reload + eend $? "Reloaded mako configuration" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/dbus/mako.c new/mako-1.11.0/dbus/mako.c --- old/mako-1.10.0/dbus/mako.c 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/dbus/mako.c 2026-03-26 18:31:47.000000000 +0100 @@ -129,6 +129,10 @@ wl_container_of(state->history.next, notif, link); wl_list_remove(¬if->link); + finish_style(¬if->style); + init_empty_style(¬if->style); + apply_each_criteria(&state->config.criteria, notif); + insert_notification(state, notif); set_dirty(notif->surface); @@ -136,22 +140,16 @@ return sd_bus_reply_method_return(msg, ""); } -static int handle_list(sd_bus_message *msg, struct wl_list *list) { - - sd_bus_message *reply = NULL; - int ret = sd_bus_message_new_method_return(msg, &reply); - if (ret < 0) { - return ret; - } +static int handle_list_for_each(sd_bus_message *reply, struct wl_list *list) { - ret = sd_bus_message_open_container(reply, 'a', "a{sv}"); + int ret = sd_bus_message_open_container(reply, 'a', "a{sv}"); if (ret < 0) { return ret; } struct mako_notification *notif; wl_list_for_each(notif, list, link) { - ret = sd_bus_message_open_container(reply, 'a', "{sv}"); + int ret = sd_bus_message_open_container(reply, 'a', "{sv}"); if (ret < 0) { return ret; } @@ -258,6 +256,21 @@ return ret; } + return 0; +} + +static int handle_list(sd_bus_message *msg, struct wl_list *list) { + sd_bus_message *reply = NULL; + int ret = sd_bus_message_new_method_return(msg, &reply); + if (ret < 0) { + return ret; + } + + ret = handle_list_for_each(reply, list); + if (ret < 0) { + return ret; + } + ret = sd_bus_send(NULL, reply, NULL); if (ret < 0) { return ret; @@ -462,6 +475,25 @@ sd_bus_emit_properties_changed(state->bus, service_path, service_interface, "Modes", NULL); } + +static int get_notifications(sd_bus *bus, const char *path, + const char *interface, const char *property, + sd_bus_message *reply, void *data, + sd_bus_error *ret_error) { + struct mako_state *state = data; + + int ret = handle_list_for_each(reply, &state->notifications); + if (ret < 0) { + return ret; + } + + return 0; +} + +void emit_notifications_changed(struct mako_state *state) { + sd_bus_emit_properties_changed(state->bus, service_path, service_interface, "Notifications", NULL); +} + static const sd_bus_vtable service_vtable[] = { SD_BUS_VTABLE_START(0), SD_BUS_METHOD("DismissNotifications", "a{sv}", "", handle_dismiss, SD_BUS_VTABLE_UNPRIVILEGED), @@ -474,6 +506,7 @@ SD_BUS_METHOD("ListModes", "", "as", handle_list_modes, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD("SetModes", "as", "", handle_set_modes, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_PROPERTY("Modes", "as", get_modes, 0, SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION), + SD_BUS_PROPERTY("Notifications", "aa{sv}", get_notifications, 0, SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION), SD_BUS_VTABLE_END }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/doc/mako.5.scd new/mako-1.11.0/doc/mako.5.scd --- old/mako-1.10.0/doc/mako.5.scd 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/doc/mako.5.scd 2026-03-26 18:31:47.000000000 +0100 @@ -105,7 +105,7 @@ display an interactive action menu on middle click: ``` - on-button-middle=exec makoctl menu -n "$id" dmenu -p 'Select action: ' + on-button-middle=exec makoctl menu -n "$id" -- wmenu -p 'Select action: ' ``` The following option will play a sound when a new notification is opened: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/doc/makoctl.1.scd new/mako-1.11.0/doc/makoctl.1.scd --- old/mako-1.10.0/doc/makoctl.1.scd 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/doc/makoctl.1.scd 2026-03-26 18:31:47.000000000 +0100 @@ -62,17 +62,27 @@ Examples: - ``` - makoctl menu dmenu -p 'Select Action: ' - makoctl menu -n 12345 wofi -d -p 'Choose Action: ' - ``` + ``` + makoctl menu -- wmenu -p 'Select Action: ' + makoctl menu -n 12345 -- wofi -d -p 'Choose Action: ' + ``` *list* Retrieve a list of current notifications. + Options: + + *-j* + Use JSON output. + *history* Retrieve a list of dismissed notifications. + Options: + + *-j* + Use JSON output. + *reload* Reloads the configuration file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/include/dbus.h new/mako-1.11.0/include/dbus.h --- old/mako-1.10.0/include/dbus.h 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/include/dbus.h 2026-03-26 18:31:47.000000000 +0100 @@ -27,6 +27,8 @@ void emit_modes_changed(struct mako_state *state); +void emit_notifications_changed(struct mako_state *state); + int init_dbus_mako(struct mako_state *state); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/makoctl.c new/mako-1.11.0/makoctl.c --- old/mako-1.10.0/makoctl.c 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/makoctl.c 2026-03-26 18:31:47.000000000 +0100 @@ -280,12 +280,136 @@ return str == NULL || str[0] == '\0'; } -static int print_notification(sd_bus_message *reply) { - uint32_t id = 0; - const char *summary = NULL, *app_name = NULL, *category = NULL, - *desktop_entry = NULL; - uint8_t urgency = -1; - char **actions = NULL; +static const char *urgency_name(uint8_t urgency) { + switch (urgency) { + case 0: + return "low"; + case 1: + return "normal"; + case 2: + return "critical"; + } + return NULL; +} + +struct notification_metadata { + uint32_t id; + const char *app_name, *app_icon, *category, *desktop_entry, *summary, *body; + uint8_t urgency; + char **actions; +}; + +static void print_notification_as_text(const struct notification_metadata *notif) { + printf("Notification %" PRIu32 ":", notif->id); + if (!is_empty_str(notif->summary)) { + printf(" %s", notif->summary); + } + printf("\n"); + + if (!is_empty_str(notif->app_name)) { + printf(" App name: %s\n", notif->app_name); + } + if (!is_empty_str(notif->category)) { + printf(" Category: %s\n", notif->category); + } + if (!is_empty_str(notif->desktop_entry)) { + printf(" Desktop entry: %s\n", notif->desktop_entry); + } + + const char *urgency_desc = urgency_name(notif->urgency); + if (urgency_desc != NULL) { + printf(" Urgency: %s\n", urgency_desc); + } + + if (notif->actions != NULL) { + printf(" Actions:\n"); + for (size_t i = 0; notif->actions[i] != NULL; i += 2) { + const char *key = notif->actions[i], *title = notif->actions[i + 1]; + printf(" %s: %s\n", key, title); + } + } +} + +static void print_json_str(const char *str) { + if (str == NULL) { + printf("null"); + return; + } + + printf("\""); + for (size_t i = 0; str[i] != '\0'; i++) { + char ch = str[i]; + switch (ch) { + case '"': + printf("\\\""); + break; + case '\\': + printf("\\\\"); + break; + case '\b': + printf("\\b"); + break; + case '\f': + printf("\\f"); + break; + case '\n': + printf("\\n"); + break; + case '\r': + printf("\\r"); + break; + case '\t': + printf("\\t"); + break; + default: + if (ch > 0 && ch < 0x20) { + printf("\\u%04x", ch); + } else { + printf("%c", ch); + } + } + } + printf("\""); +} + +static void print_json_key_value_str(const char *key, const char *value) { + printf(" "); + print_json_str(key); + printf(": "); + print_json_str(is_empty_str(value) ? NULL : value); + printf(",\n"); +} + +static void print_notification_as_json(const struct notification_metadata *notif) { + printf(" {\n"); + printf(" \"id\": %" PRIu32 ",\n", notif->id); + print_json_key_value_str("app_name", notif->app_name); + print_json_key_value_str("app_icon", notif->app_icon); + print_json_key_value_str("category", notif->category); + print_json_key_value_str("desktop_entry", notif->desktop_entry); + print_json_key_value_str("summary", notif->summary); + print_json_key_value_str("body", notif->body); + print_json_key_value_str("urgency", urgency_name(notif->urgency)); + printf(" \"actions\": {"); + if (notif->actions != NULL) { + bool first = true; + for (size_t i = 0; notif->actions[i] != NULL; i += 2) { + const char *key = notif->actions[i], *title = notif->actions[i + 1]; + if (!first) { + printf(", "); + } + first = false; + print_json_str(key); + printf(": "); + print_json_str(title); + } + } + printf("}\n"); + printf(" }"); +} + +static int print_notification(sd_bus_message *reply, bool json) { + struct notification_metadata notif = { .urgency = -1 }; while (true) { int ret = sd_bus_message_enter_container(reply, 'e', "sv"); if (ret < 0) { @@ -301,19 +425,23 @@ } if (strcmp(key, "id") == 0) { - ret = sd_bus_message_read(reply, "v", "u", &id); + ret = sd_bus_message_read(reply, "v", "u", ¬if.id); } else if (strcmp(key, "actions") == 0) { - ret = read_actions(reply, &actions); + ret = read_actions(reply, ¬if.actions); } else if (strcmp(key, "summary") == 0) { - ret = sd_bus_message_read(reply, "v", "s", &summary); + ret = sd_bus_message_read(reply, "v", "s", ¬if.summary); + } else if (strcmp(key, "body") == 0) { + ret = sd_bus_message_read(reply, "v", "s", ¬if.body); } else if (strcmp(key, "app-name") == 0) { - ret = sd_bus_message_read(reply, "v", "s", &app_name); + ret = sd_bus_message_read(reply, "v", "s", ¬if.app_name); + } else if (strcmp(key, "app-icon") == 0) { + ret = sd_bus_message_read(reply, "v", "s", ¬if.app_icon); } else if (strcmp(key, "category") == 0) { - ret = sd_bus_message_read(reply, "v", "s", &category); + ret = sd_bus_message_read(reply, "v", "s", ¬if.category); } else if (strcmp(key, "desktop-entry") == 0) { - ret = sd_bus_message_read(reply, "v", "s", &desktop_entry); + ret = sd_bus_message_read(reply, "v", "s", ¬if.desktop_entry); } else if (strcmp(key, "urgency") == 0) { - ret = sd_bus_message_read(reply, "v", "y", &urgency); + ret = sd_bus_message_read(reply, "v", "y", ¬if.urgency); } else { ret = sd_bus_message_skip(reply, "v"); } @@ -327,56 +455,43 @@ } } - printf("Notification %" PRIu32 ":", id); - if (!is_empty_str(summary)) { - printf(" %s", summary); + if (json) { + print_notification_as_json(¬if); + } else { + print_notification_as_text(¬if); } - printf("\n"); - if (!is_empty_str(app_name)) { - printf(" App name: %s\n", app_name); - } - if (!is_empty_str(category)) { - printf(" Category: %s\n", category); - } - if (!is_empty_str(desktop_entry)) { - printf(" Desktop entry: %s\n", desktop_entry); - } + free_strv(notif.actions); + return 0; +} - const char *urgency_desc = NULL; - switch (urgency) { - case 0: - urgency_desc = "low"; - break; - case 1: - urgency_desc = "normal"; - break; - case 2: - urgency_desc = "critical"; - break; - } - if (urgency_desc != NULL) { - printf(" Urgency: %s\n", urgency_desc); - } +static int print_notification_list(sd_bus_message *reply, int argc, char *argv[]) { + bool json = false; + while (true) { + int opt = getopt(argc, argv, "j"); + if (opt == -1) { + break; + } - if (actions != NULL) { - printf(" Actions:\n"); - for (size_t i = 0; actions[i] != NULL; i += 2) { - const char *key = actions[i], *title = actions[i + 1]; - printf(" %s: %s\n", key, title); + switch (opt) { + case 'j': + json = true; + break; + default: + return -EINVAL; } } - free_strv(actions); - return 0; -} - -static int print_notification_list(sd_bus_message *reply) { int ret = sd_bus_message_enter_container(reply, 'a', "a{sv}"); if (ret < 0) { return ret; } + if (json) { + printf("["); + } + + bool first = true; while (true) { ret = sd_bus_message_enter_container(reply, 'a', "{sv}"); if (ret < 0) { @@ -385,7 +500,15 @@ break; } - ret = print_notification(reply); + if (json) { + if (!first) { + printf(","); + } + printf("\n"); + } + first = false; + + ret = print_notification(reply, json); if (ret < 0) { return ret; } @@ -396,6 +519,10 @@ } } + if (json) { + printf("\n]\n"); + } + return sd_bus_message_exit_container(reply); } @@ -406,7 +533,7 @@ return ret; } - ret = print_notification_list(reply); + ret = print_notification_list(reply, argc, argv); sd_bus_message_unref(reply); return ret; } @@ -418,7 +545,7 @@ return ret; } - ret = print_notification_list(reply); + ret = print_notification_list(reply, argc, argv); sd_bus_message_unref(reply); return ret; } @@ -792,8 +919,8 @@ " if none is given\n" " [-a|--all] Dismiss all notifications\n" " [-g|--group] Dismiss all the notifications\n" - " [-h|--no-history] Dismiss w/o adding to history\n" " in the last notification's group\n" + " [-h|--no-history] Dismiss w/o adding to history\n" " restore Restore the most recently expired\n" " notification from the history buffer\n" " invoke [-n id] [action] Invoke an action on the notification\n" @@ -803,8 +930,8 @@ " action to be invoked on the notification\n" " with the given id, or the last\n" " notification if none is given\n" - " list List notifications\n" - " history List history\n" + " list [-j] List notifications\n" + " history [-j] List history\n" " reload Reload the configuration file\n" " mode List modes\n" " mode [-a mode]... [-r mode]... Add/remove modes\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/meson.build new/mako-1.11.0/meson.build --- old/mako-1.10.0/meson.build 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/meson.build 2026-03-26 18:31:47.000000000 +0100 @@ -1,7 +1,7 @@ project( 'mako', 'c', - version: '1.10.0', + version: '1.11.0', license: 'MIT', meson_version: '>=0.60.0', default_options: [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/notification.c new/mako-1.11.0/notification.c --- old/mako-1.10.0/notification.c 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/notification.c 2026-03-26 18:31:47.000000000 +0100 @@ -109,6 +109,8 @@ void close_notification(struct mako_notification *notif, enum mako_notification_close_reason reason, bool add_to_history) { + struct mako_state *state = notif->state; + notify_notification_closed(notif, reason); wl_list_remove(¬if->link); // Remove so regrouping works... wl_list_init(¬if->link); // ...but destroy will remove again. @@ -116,12 +118,12 @@ struct mako_criteria *notif_criteria = create_criteria_from_notification( notif, ¬if->style.group_criteria_spec); if (notif_criteria) { - group_notifications(notif->state, notif_criteria); + group_notifications(state, notif_criteria); destroy_criteria(notif_criteria); } if (!notif->style.history || - notif->state->config.max_history <= 0) { + state->config.max_history <= 0) { destroy_notification(notif); return; } @@ -130,16 +132,18 @@ notif->timer = NULL; if (add_to_history) { - wl_list_insert(¬if->state->history, ¬if->link); - while (wl_list_length(¬if->state->history) > - notif->state->config.max_history) { + notif->surface = NULL; + wl_list_insert(&state->history, ¬if->link); + while (wl_list_length(&state->history) > state->config.max_history) { struct mako_notification *n = - wl_container_of(notif->state->history.prev, n, link); + wl_container_of(state->history.prev, n, link); destroy_notification(n); } } else { destroy_notification(notif); } + + emit_notifications_changed(state); } struct mako_notification *get_notification(struct mako_state *state, @@ -158,8 +162,8 @@ struct mako_notification *notif; wl_list_for_each(notif, &state->notifications, link) { if (notif->tag && strlen(notif->tag) != 0 && - strcmp(notif->tag, tag) == 0 && - strcmp(notif->app_name, app_name) == 0) { + strcmp(notif->tag, tag) == 0 && + strcmp(notif->app_name, app_name) == 0) { return notif; } } @@ -311,7 +315,7 @@ if (current[1] == '%') { value = strdup("%"); } else { - value = format_func(current[1], &markup, data); + value = format_func(current[1], &markup, data); } if (value == NULL) { value = strdup(""); @@ -467,7 +471,7 @@ } while (current <= MAKO_NOTIFICATION_URGENCY_CRITICAL && - current >= MAKO_NOTIFICATION_URGENCY_UNKNOWN) { + current >= MAKO_NOTIFICATION_URGENCY_UNKNOWN) { struct mako_notification *notif; wl_list_for_each_reverse(notif, notifications, link) { if (notif->urgency == current) { @@ -503,6 +507,8 @@ } wl_list_insert(insert_node, ¬if->link); + + emit_notifications_changed(state); } // Iterate through all of the current notifications and group any that share diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/render.c new/mako-1.11.0/render.c --- old/mako-1.10.0/render.c 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/render.c 2026-03-26 18:31:47.000000000 +0100 @@ -84,7 +84,8 @@ } cairo_font_options_t *fo = cairo_font_options_create(); - if (surface->surface_output->subpixel == WL_OUTPUT_SUBPIXEL_NONE) { + if (surface->surface_output->subpixel == WL_OUTPUT_SUBPIXEL_NONE || + surface->surface_output->subpixel == WL_OUTPUT_SUBPIXEL_UNKNOWN) { cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_GRAY); } else { cairo_font_options_set_antialias(fo, CAIRO_ANTIALIAS_SUBPIXEL); @@ -446,33 +447,35 @@ struct mako_style *style = &hidden_notif->style; - if (style->margin.top > pending_bottom_margin) { - total_height += style->margin.top; - } else { - total_height += pending_bottom_margin; - } + if (!style->invisible) { + if (style->margin.top > pending_bottom_margin) { + total_height += style->margin.top; + } else { + total_height += pending_bottom_margin; + } + + struct mako_hidden_format_data data = { + .hidden = hidden_count, + .count = total_notifications, + }; + + size_t text_ln = + format_text(style->format, NULL, format_hidden_text, &data); + char *text = malloc(text_ln + 1); + if (text == NULL) { + fprintf(stderr, "allocation failed"); + return; + } + + format_text(style->format, text, format_hidden_text, &data); + + int hidden_height = render_notification( + cairo, state, surface, style, text, NULL, total_height, scale, NULL, 0); + free(text); - struct mako_hidden_format_data data = { - .hidden = hidden_count, - .count = total_notifications, - }; - - size_t text_ln = - format_text(style->format, NULL, format_hidden_text, &data); - char *text = malloc(text_ln + 1); - if (text == NULL) { - fprintf(stderr, "allocation failed"); - return; + total_height += hidden_height; + pending_bottom_margin = style->margin.bottom; } - - format_text(style->format, text, format_hidden_text, &data); - - int hidden_height = render_notification( - cairo, state, surface, style, text, NULL, total_height, scale, NULL, 0); - free(text); - - total_height += hidden_height; - pending_bottom_margin = style->margin.bottom; destroy_notification(hidden_notif); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mako-1.10.0/wayland.c new/mako-1.11.0/wayland.c --- old/mako-1.10.0/wayland.c 2025-03-16 15:21:09.000000000 +0100 +++ new/mako-1.11.0/wayland.c 2026-03-26 18:31:47.000000000 +0100 @@ -619,6 +619,10 @@ zwlr_layer_surface_v1_destroy(surface->layer_surface); surface->layer_surface = NULL; } + if (surface->frame_callback != NULL) { + wl_callback_destroy(surface->frame_callback); + surface->frame_callback = NULL; + } if (surface->surface != NULL) { wl_surface_destroy(surface->surface); surface->surface = NULL;
