Fix: close notification center after clicking action buttons#2276
Merged
bbedward merged 2 commits intoAvengeMedia:masterfrom Apr 27, 2026
Merged
Conversation
When clicking action buttons (e.g., "View", "Activate") in the notification center, the action fires but the popout stays open. Since the center is a layer-shell surface, it blocks focus changes on Wayland compositors like niri, making the action appear to do nothing. The keyboard navigation path already closes the center after invoking actions; this brings the mouse click path in line. Also fix closeNotificationCenter() in PopoutService to set notificationHistoryVisible = false (matching PopoutManager._closePopout) instead of calling close() directly, which left the visibility property stale and caused the bell toggle to require two presses to reopen. Fixes AvengeMedia#2178
NotificationCenterPopout has its own notificationHistoryVisible property that drives open/close, but the PopoutService public API (open, close, toggle) calls DankPopout methods directly, bypassing that property. This leaves notificationHistoryVisible stale, causing the bell toggle to require two presses to reopen after a programmatic close. Sync the property from onShouldBeVisibleChanged so any caller going through open()/close() gets the state corrected automatically.
Contributor
|
how does this handle the 'dismiss' button? Normally you wouldn't want to dismiss the whole inbox when clicking 'dismiss' on a single notification. |
Collaborator
|
@kanghengliu dismiss button doesnt close the center, so good there. |
bbedward
pushed a commit
that referenced
this pull request
Apr 28, 2026
* Close notification center after clicking action buttons When clicking action buttons (e.g., "View", "Activate") in the notification center, the action fires but the popout stays open. Since the center is a layer-shell surface, it blocks focus changes on Wayland compositors like niri, making the action appear to do nothing. The keyboard navigation path already closes the center after invoking actions; this brings the mouse click path in line. Also fix closeNotificationCenter() in PopoutService to set notificationHistoryVisible = false (matching PopoutManager._closePopout) instead of calling close() directly, which left the visibility property stale and caused the bell toggle to require two presses to reopen. Fixes #2178 * Sync notificationHistoryVisible with shouldBeVisible NotificationCenterPopout has its own notificationHistoryVisible property that drives open/close, but the PopoutService public API (open, close, toggle) calls DankPopout methods directly, bypassing that property. This leaves notificationHistoryVisible stale, causing the bell toggle to require two presses to reopen after a programmatic close. Sync the property from onShouldBeVisibleChanged so any caller going through open()/close() gets the state corrected automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2178
Close the notification center when clicking notification action buttons, matching the existing behavior of the popup toast, keyboard navigation (
NotificationKeyboardController), and control center widgets. This lets the relevant app receive focus after the action is invoked, rather than being blocked by the layer-shell surface.Also sync
notificationHistoryVisiblefromonShouldBeVisibleChangedso that programmaticclose()calls (like fromPopoutService.closeNotificationCenter()) keep the property consistent. Without this, the bell toggle requires two presses to reopen after a programmatic close.Before
before.mp4
After
after.mp4