Skip to content

KeePassXC does not show in Alt+Tab under GNOME Wayland until StartupNotify times out #6423

@chenxiaolong

Description

@chenxiaolong

Overview

KeePass currently does not show in Alt+Tab under GNOME Wayland until StartupNotify (from the .desktop file) times out. I suspect this is because of the naming differences between the X11 WM_CLASS and Wayland/xdg-shell's app_id.

Under X11, I believe the Qt XCB platform plugin uses QCoreApplication::applicationName() to set the WM_CLASS property. KeePassXC's WM_CLASS is:

$ xprop WM_CLASS
WM_CLASS(STRING) = "keepassxc", "KeePassXC"

Under Wayland, qtwayland uses the .desktop filename to set the app_id: https://github.com/qt/qtwayland/blob/20d7cc45933a4a26c886b47c0b69da82195e7204/src/client/qwaylandwindow.cpp#L159-L163 Thus, the value is set to org.keepassxc.KeePassXC. This can be confirmed by using gnome-shell's "looking glass" feature:
image

Because KeePassXC's .desktop file specifies:

StartupWMClass=keepassxc

it will never match under a Wayland session.

Steps to Reproduce

  1. Load Wayland gnome-shell session
  2. Start KeePassXC via its .desktop file
  3. Immediately try to Alt+Tab

Expected Behavior

KeePassXC should immediately show up in the Alt+Tab list.

Actual Behavior

KeePassXC is missing from Alt+Tab list until StartupNotify times out.

Context

KeePassXC - Version 2.6.4
Revision: 34a78f0

Qt 5.15.2
Debugging mode is disabled.

Operating system: Fedora 34 (Workstation Edition)
CPU architecture: x86_64
Kernel: linux 5.10.19-200.fc33.x86_64

Enabled extensions:
- Auto-Type
- Browser Integration
- SSH Agent
- KeeShare (signed and unsigned sharing)
- YubiKey
- Secret Service Integration

Cryptographic libraries:
- libgcrypt 1.9.2-unknown

Operating System: Fedora 34 (also reproducible under 33)
Desktop Env: Gnome
Windowing System: Wayland

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions