Skip to content

Update passkey message instead of closing and recreating notification#3252

Open
coyotebush wants to merge 1 commit into
blueman-project:mainfrom
coyotebush:passkey-replace
Open

Update passkey message instead of closing and recreating notification#3252
coyotebush wants to merge 1 commit into
blueman-project:mainfrom
coyotebush:passkey-replace

Conversation

@coyotebush

Copy link
Copy Markdown

Closing and recreating the notification was particularly problematic in the context of the Qubes OS notification proxy not supporting CloseNotification, but even with just xfce4-notifyd or the fallback dialog, it causes flickering. By now the notification code now supports set_message for a better approach. But only update a previous passkey notification and not potentially a notification that has actions.

@sonarqubecloud

Copy link
Copy Markdown

@infirit

infirit commented May 17, 2026

Copy link
Copy Markdown
Contributor

I don't think we need a dedicated notification for this. Does 447102b work for you? I tested this on plasma and it works fine there.

@coyotebush

Copy link
Copy Markdown
Author

I tried that first. The only issue would be that if self._notification was most recently assigned in _on_request_confirmation, it would retain action buttons. Presumably in practice bluez will invoke Cancel (or connect the device) in between, but relying on that feels a little fragile. The original Qubes OS bug report would have reached that state due to CloseNotification raising an exception, and I can certainly also reach that state with manual dbus-send calls.

@infirit

infirit commented May 18, 2026

Copy link
Copy Markdown
Contributor

I see we don't actually check if the notification daemon supports actions in _on_request_confirmation which is a bug which we need to fix.

I assume your notification daemon doesn't support actions. Do you advertise you support actions?

edit: Although I'm not sure if we can then use a notification for _on_request_confirmation if actions are not supported.

@coyotebush

coyotebush commented May 18, 2026

Copy link
Copy Markdown
Author

The Qubes proxy supports actions and advertises such. And Notification.py would fall back to a dialog otherwise, which I suppose would appear even stranger if reused for a passkey.

if forced_fallback or 'body' not in caps or (actions and 'actions' not in caps):
# Use fallback in the case:
# * user does not want to use a notification daemon
# * the notification daemon is not available
# * we have to show actions and the notification daemon does not provide them
klass: type[_NotificationBubble | _NotificationDialog] = _NotificationDialog

@infirit infirit mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants