Skip to content

bug: notification replaces_id duplicates visible popup instead of updating it #122

Description

@P-ict0

Did you check docs and existing issues?

  • I have read all the Hyde docs
  • I have searched the existing issues of Hyde
  • I have searched the existing issues of plugins related to this issue

Hyde version

hydebar main @ d055edf

Operating system/version

Arch Linux 7.1.10-arch1-1

Describe the bug

When a notification uses the freedesktop replaces_id mechanism while the original popup is still visible, Hydebar creates an additional popup instead of updating the existing one.

The notification server appears to handle the replacement ID correctly and reuses the existing notification ID. The problem is in the visible popup handling: each NotificationEvent::Received appends a new popup without checking whether a popup with the same notification ID is already on screen.

As a result, multiple visible popups can represent the same notification ID.

Steps To Reproduce

  1. Run Hydebar with its native notification popups enabled.
  2. Send a notification and retain the notification ID:
id=$(notify-send -p "Replacement test" "First body")
  1. Before the first popup expires, replace it using the returned ID:
notify-send -r "$id" "Replacement test" "Updated body"

Expected Behavior

The existing popup should be updated in place rather than a second popup being created.

There should be only one visible popup remaining for the notification ID. Its contents and expiration time should match the replacement notification, and its lifetime should restart from the replacement time.

This matches the freedesktop notification specification of replaces_id.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions