Firefox on native Wayland fails to request taskbar attention for JavaScript alert() dialogs
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: bugzilla, Assigned: sinker)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:160.0) Gecko/20100101 Firefox/160.0
Steps to reproduce
Title: Firefox on native Wayland fails to request taskbar attention for JavaScript alert() dialogs
Environment: Arch Linux, KDE Plasma (Wayland), Firefox
Steps to reproduce:
- Run Firefox using its native Wayland backend.
- Open the developer console and execute:
setTimeout(() => alert("Attention test"), 5000); - Switch to another application before the alert appears.
- Observe Firefox's taskbar entry.
Expected result:
Firefox requests attention, causing its KDE Plasma taskbar entry to flash orange.
Actual result:
No attention indicator appears. KWin Debug Console reports demandsAttention = false.
Additional testing:
- Running Firefox under XWayland (
MOZ_ENABLE_WAYLAND=0 firefox) restores the expected behavior. - A native Wayland PyQt6 application using
QApplication.alert()correctly triggers KDE's attention indicator. - This suggests Firefox's native Wayland implementation is failing to request attention, rather than a general KDE/KWin issue.
Impact:
Background JavaScript alerts, including those generated by userscripts, can go unnoticed.
Actual results
^
Expected results
^
Comment 1•9 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•6 days ago
|
||
Yes, that's it. Wayland doesn't allow applications itself to raise over other apps, focus can be only transferred from other already active application window. So the alert should be visible / active when an Firefox window is recently visible / focused. Is it that case?
The Firefox window was focused immediately before switching to another application, approximately 5 seconds before the alert appeared.
I understand that Wayland restricts applications from raising themselves or stealing focus, but I'm specifically referring to requesting attention (the orange taskbar indicator, in my case), not raising or focusing the window.
Importantly, a native Wayland PyQt6 application using QApplication.alert() successfully triggers KDE's taskbar attention indicator, even when another application is focused.
Firefox's alert() and prompt() do not trigger this indicator under native Wayland, whereas alert() works under XWayland.
Is Firefox expected to request attention for these dialogs under native Wayland, without attempting to activate the window?
| Assignee | ||
Updated•6 days ago
|
| Assignee | ||
Comment 4•6 days ago
|
||
I think it is not about input focus or visibility. It is to give user a hint that Firefox need focus. It can be achieved through xdg-activation.
[1] https://searchfox.org/firefox-main/source/widget/gtk/nsWindow.cpp#5163
| Assignee | ||
Comment 5•6 days ago
|
||
GTK3's gdk_window_set_urgency_hint() is a no-op on Wayland, so
nsWindow::GetAttention() did nothing there. Activate the window with an
xdg-activation token that carries no input serial or source surface; the
compositor won't raise the window with it and marks it as demanding
attention instead (KWin, Mutter).
Updated•4 days ago
|
Comment 7•1 day ago
|
||
| bugherder | ||
Description
•