Open Bug 1809711 Opened 2 years ago Updated 2 years ago

Support for Wayland xdg_activation_v1 protocol works for outbound activation requests, but not incoming ones

Categories

(Thunderbird :: OS Integration, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: nate, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0

Steps to reproduce:

  1. Apply the code from https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2493 to KDE Plasma and reboot.
  2. Open Thunderbird
  3. Make another app active
  4. Receive an email, which generates a system notification
  5. Click on the notification

Actual results:

Thunderbird's window was activated, but not raised.

Expected results:

Thunderbird's window should have been both activated and raised.

I'm using Thunderbird version 102.6.0 packaged by Fedora KDE 37, a Linux distro.

Interestingly, when I click on a link in Thunderbird, it activates and raises Firefox's browser window, which indicates some support for the xdg_activation_v1 protocol. It would appear that the protocol was implemented for outgoing activation requests, but not incoming ones.

WAYLAND_DEBUG=1 thunderbird shows this when clicking on a notification:

[2461144.542] -> xdg_activation_v1@15.get_activation_token(new id xdg_activation_token_v1@68)
[2461144.569] -> xdg_activation_token_v1@68.set_serial(1247, wl_seat@19)
[2461144.580] -> xdg_activation_token_v1@68.set_surface(wl_surface@39)
[2461144.588] -> xdg_activation_token_v1@68.commit()
[2461144.619] wl_display@1.delete_id(67)
[2461144.812] xdg_activation_token_v1@68.done("not-granted-666")
[2461144.855] -> xdg_activation_token_v1@68.destroy()
[2461144.881] -> xdg_activation_v1@15.activate("not-granted-666", wl_surface@39)

This suggests that Thunderbird tries to use xdg-activation, but does it wrong.

Thunderbird should not request a token itself (the compositor denies such requests for anything but the active surface, hence the 'not-granted-666'). Instead it should use the token provided by the org.freedesktop.Notifications.ActivationToken DBus signal (https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#signals) and send that to the compositor.

GTK apps show the same issue (https://gitlab.gnome.org/GNOME/gtk/-/issues/5483)

You need to log in before you can comment on or make changes to this bug.