Chrome PWA opens a new instance from App Launcher instead of focusing existing window — KDE Plasma 6.6 / Wayland / Fedora 44
System Information
| OS | Fedora 44 |
| KDE Plasma | 6.6 |
| KDE Frameworks | (latest via Fedora 44 repos) |
| Qt Version | (latest via Fedora 44 repos) |
| Graphics Platform | Wayland |
| Browser | Google Chrome (stable) |
| Hardware | ASUS Vivobook, AMD Ryzen AI 9 HX 370, AMD Radeon Graphics |
Description
When a Chrome PWA (e.g. WhatsApp Web) is already running, clicking it again from the App Launcher (Kickoff) opens a second instance instead of raising/focusing the existing window.
I have verified this is KDE Plasma + Wayland specific by testing on the same Fedora 44 installation with other desktops:
GNOME — focuses existing window correctly
COSMIC desktop — focuses existing window correctly
KDE Plasma 6.6 on Wayland — always opens a new instance
Steps to Reproduce
- Install a Chrome PWA (e.g. WhatsApp Web via Chrome → More Tools → Create Shortcut → Open as window)
- Open the PWA — it is now running
- Open App Launcher (Kickoff) and search for the PWA by name
- Click it
Expected: Existing window is raised and focused
Observed: A second instance of the PWA opens
Debugging Done
I used qdbus org.kde.KWin /KWin org.kde.KWin.queryWindowInfo while clicking the WhatsApp window and got:
caption: WhatsApp Web
desktopFile: chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1
resourceClass: chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1
resourceName: chrome
The PWA is running as a native Wayland window (confirmed because wmctrl -x -l does not list it at all, only XWayland windows appear).
kdotool search --class chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1 does correctly detect the window and returns its UUID.
What I Have Already Tried
-
StartupWMClassin.desktopfile — tried both:crx_hnpfjngllnobngcgfapefoaidbinmjnm(XWayland/X11 format)chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1(matchesresourceClassfrom qdbus)
-
Renamed
.desktopfile to exactly match thedesktopFilevalue KDE reports:
~/.local/share/applications/chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1.desktop -
Set
chrome://flags/#ozone-platform-hintto Auto — Chrome now runs natively on Wayland (confirmed viachrome://gpu), but the problem persists -
Refreshed KDE databases after every change:
update-desktop-database ~/.local/share/applications/ kbuildsycoca6 --noincremental -
wmctrlwrapper script — does not work because the PWA is a native Wayland window invisible to wmctrl -
kdotoolwrapper script — built kdotool from source (not available in Fedora 44 repos). Script detects the window correctly from terminal, but the App Launcher still spawns a new instance rather than running the wrapper
Current .desktop file contents
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=WhatsApp Web
Exec=/opt/google/chrome/google-chrome "--profile-directory=Profile 1" --app-id=hnpfjngllnobngcgfapefoaidbinmjnm
Icon=chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1
StartupWMClass=chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Profile_1
StartupNotify=false
Questions
- Is there a correct way to make KWin/Plasma associate an already-running native Wayland Chrome PWA window with its
.desktoplauncher entry? - Is this related to the XDG Activation token not being passed correctly by Chrome when it requests focus? (I noticed Bug #443725 mentions this pattern)
- Is there a KWin scripting API or DBus call that can be used to reliably focus an existing window by its
desktopFileor UUID before the launcher spawns a new process? - Are there any known fixes or workarounds planned for Plasma 6.x?
Thank you for any guidance.