Repository navigation
Conversation
This was referenced Oct 20, 2026
Member
|
Sorry, this is a duplicate of #1166. Please search first. |
Member
|
*partial duplicate, rebase once 1166 is merged and use its token provisioning |
outfoxxed
force-pushed
the
master
branch
2 times, most recently
from
October 22, 2026 06:48
bf6302e to
9b0f339
Compare
dmkenney
force-pushed
the
notification-activation-token
branch
2 times, most recently
from
October 22, 2026 18:30
bbc6bd4 to
250b480
Compare
outfoxxed
requested changes
Oct 24, 2026
Comment on lines
+74
to
+82
| QString requestActivationTokenNow() { | ||
| const auto token = std::make_shared<QString>(); | ||
| if (!requestActivationToken([token](const QString& value) { *token = value; })) return {}; | ||
|
|
||
| // The compositor answers the request with the done event, so a roundtrip delivers the token. | ||
| QtWaylandClient::QWaylandIntegration::instance()->display()->forceRoundTrip(); | ||
| return *token; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
This blocks on the UI thread for an indeterminate amount of time, which is not allowed, and the compositor isn't even required to provide the token in that roundtrip.
dmkenney
force-pushed
the
notification-activation-token
branch
2 times, most recently
from
October 24, 2026 14:36
590a848 to
858837d
Compare
requestActivationToken() connected each callback to the input window's xdgActivationTokenCreated signal, and the token object was owned by the window. Two requests made before the compositor answered both got the first token, and the second token was dropped. A request whose window was destroyed before the answer, such as a launcher closing itself after starting an app, lost its token and never ran its callback. Give each request its own token object that runs its own callback, and don't parent it to the window, so the token arrives either way.
Request a token with the shared activation helper and send it with the ActivationToken signal before ActionInvoked, so the sender can raise its window when it handles the action. The token arrives asynchronously, and callers often dismiss the notification right after invoking an action. Closes requested while an invocation waits for its token are held until ActionInvoked has gone out, so the client still sees ActionInvoked before NotificationClosed.
dmkenney
force-pushed
the
notification-activation-token
branch
from
November 24, 2026 17:39
858837d to
cd1cba4
Compare
maxstreese
added a commit
to maxstreese/maxnix
that referenced
this pull request
Nov 28, 2026
Clicking a notification did nothing visible. An app may raise its own window only with an activation token, which the notification daemon is meant to hand over with the click. Quickshell 0.3.2 under DMS does not: a click recorded on the session bus sent ActionInvoked and NotificationClosed, and no ActivationToken. The app then asks with a token niri does not accept. niri's debug.honor-xdg-activation-with-invalid-serial has it honour those requests. The price is focus-stealing protection: any app that asks gets the focus, click or no click. A workaround, so docs/blocked.toml tracks the upstream fix, quickshell-mirror/quickshell#1351, open and waiting on a rebase. The system builds and niri accepts the config. Not yet tried on the running session: whether clicks now land on the right window. Refs: quickshell-mirror/quickshell#1351 Co-Authored-By: Claude <noreply@anthropic.com>
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.
Problem is when you click a notification, the app's window doesn't come forward.
After doing some testing and fixing, QuickShell detects the click, but it doesn't send the serial to the app - just doesn't pass it on. So Hyprland doesn't bring the window forward.
The fix is now QuickShell sends the app a token with the click's serial. And then the app shows that to Hyprland. And then the window comes forward.