https://bugs.kde.org/show_bug.cgi?id=521315

            Bug ID: 521315
           Summary: Launch feedback (busy cursor) is shown when an
                    already-run  ning app activates its own existing
                    window via xdg-activation
    Classification: Plasma
           Product: kwin
      Version First 6.6.4
       Reported In:
          Platform: Kubuntu
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

When an application requests activation of its own already-mapped window
through xdg-activation (e.g. Qt's QWidget::activateWindow()), KWin shows
app-launch feedback — the busy/bouncing cursor — even though nothing is
being launched. The activation itself works correctly; only the feedback
is wrong.

In src/xdgactivationv1.cpp, XdgActivationV1Integration::requestToken()
decides showNotify purely from the appId: feedback is shown whenever the
appId differs from the active window's desktopFileName and the app's
.desktop file doesn't set StartupNotify=false (default true). The
requesting surface is resolved at the top of the function
(waylandServer()->findWindow(surface)) but is not taken into account.
If the token request carries a surface that is already mapped, this is a
window-activation request, not an application launch, and startup
feedback should arguably be suppressed.

Real-world case: Telegram Desktop is adding window activation when a
touchpad swipe-to-reply gesture happens on an unfocused window
(https://github.com/telegramdesktop/tdesktop/pull/30797). Focus transfer
works, but every swipe flashes the busy cursor for the user.

STEPS TO REPRODUCE

1. Run any app whose .desktop file does not set StartupNotify=false
   (the default), e.g. a Qt 6 app.
2. Focus a different application, keeping the first app's window visible.
3. Make the first app call QWidget::activateWindow() on its mapped window
   in response to user input on its surface (so it holds a valid serial
   and the token is granted).

OBSERVED RESULT

The window is activated (correct), and the busy-cursor launch feedback
flashes until the token is consumed (incorrect — no app is launching).

EXPECTED RESULT

No launch feedback when the activation token request comes from an
already-mapped surface; feedback only for actual launches.

WORKAROUND

Adding X-KDE-StartupNotify=false to the app's .desktop file suppresses
the cursor, but also disables legitimate launch feedback for that app.

SOFTWARE/OS VERSIONS

Operating System: Kubuntu 26.04
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.10.2
Qt Version: 6.10.2 (client app: Qt's xdg-activation path in
QWidget::activateWindow())
Graphics Platform: Wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to