Skip to content

service/notifications: support activation tokens - #931

Closed
samyak-jain wants to merge 1 commit into
quickshell-mirror:masterfrom
samyak-jain:fix/notification-activation-token
Closed

service/notifications: support activation tokens#931
samyak-jain wants to merge 1 commit into
quickshell-mirror:masterfrom
samyak-jain:fix/notification-activation-token

Conversation

@samyak-jain

Copy link
Copy Markdown

Summary

  • implement the ActivationToken signal already declared by the notification D-Bus XML
  • let QML call NotificationAction.invoke(activationToken) while preserving parameterless invoke()
  • emit a non-empty activation token immediately before ActionInvoked

User-visible behavior

Notification-center QML can pass a Wayland xdg-activation token (or X11 startup ID) when invoking an action. The notified application receives that token before the action signal and can use it to focus the associated window.

action.invoke(activationToken)

Existing action.invoke() calls remain unchanged.

Validation

  • nix develop --command cmake -GNinja -B /tmp/quickshell-activation-pr.a9VfrE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DNO_PCH=ON -DBUILD_TESTING=ON
  • nix develop --command cmake --build /tmp/quickshell-activation-pr.a9VfrE (full build, 1336 targets)
  • nix develop --command ctest --test-dir /tmp/quickshell-activation-pr.a9VfrE --output-on-failure (9/9 passed)
  • clang-format -Werror --dry-run src/services/notifications/notification.cpp src/services/notifications/notification.hpp src/services/notifications/server.hpp
  • clang-tidy --load="$TIDYFOX" -p /tmp/quickshell-activation-pr.a9VfrE src/services/notifications/notification.cpp
  • generated QML metadata contains both invoke() and invoke(string); the generated D-Bus adaptor auto-relays ActivationToken

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.

1 participant