Skip to content

Add a Notifications DBus Property #579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

Image for: Conversation
Copy link
Contributor

This PR adds a Notifications property to the Mako DBus object, this holds the current list of notifications in the same format as the ListNotifications method and publishes state changes when notifications are added or removed.

The intention is that other applications wishing to respond to Mako's state can easily do so.

This is a followup from #578

This was referenced Apr 2, 2025
Signed-off-by: Max Ehrlich <max.ehr@gmail.com>
Copy link
Owner

emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

emersion merged commit 2763e92 into emersion:master Apr 3, 2025
3 checks passed
@@ -140,6 +140,8 @@ void close_notification(struct mako_notification *notif,
} else {
destroy_notification(notif);
}

emit_notifications_changed(notif->state);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notif has already been freed here in case you don't want it added to the history.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed in 30d36f2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants