Bug 514204 - Plasma Logout screen does not get focus on launch medium focus stealing prevention
Summary: Plasma Logout screen does not get focus on launch medium focus stealing preve...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks: 460318
  Show dependency treegraph
 
Reported: 2026-01-05 22:20 UTC by David Edmundson
Modified: 2026-01-27 17:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2026-01-05 22:20:57 UTC
I can't think of a good reason why a layer-shell full window shouldn't get focus by default.

They shouldn't be appearing except as a result of an explicitly user-invoked action as that would already be a bad UX.
Comment 1 Nate Graham 2026-01-06 22:59:45 UTC
Can reproduce.
Comment 2 equeim 2026-01-19 02:00:01 UTC
(In reply to David Edmundson from comment #0)
> I can't think of a good reason why a layer-shell full window shouldn't get
> focus by default.
> 
> They shouldn't be appearing except as a result of an explicitly user-invoked
> action as that would already be a bad UX.

I thinks that's because dbus-activated logout dialog doesn't XDG_ACTIVATION_TOKEN env variable (how is this supposed to work with dbus activation anyway?) and so doesn't pass it to kwin.

This causes mayActivate here return false: https://invent.kde.org/plasma/kwin/-/blob/master/src/workspace.cpp#L913
Comment 3 equeim 2026-01-19 02:06:15 UTC
I guess the token should be sent over D-Bus, via org.kde.LogoutPrompt interface. Can it be changed or will it break compatibility with something?
Comment 4 Vlad Zahorodnii 2026-01-26 14:54:21 UTC
Git commit dac404549b5fe47b32722bfae9e49b5d24d45a36 by Vlad Zahorodnii.
Committed on 26/01/2026 at 14:13.
Pushed by vladz into branch 'master'.

Allow activation fullscreen overlays without tokens

If a fullscreen overlay layer surface is shown, allow activation
requests from it even without an activation token because it will be
painted above normal windows anyway.

If layer surfaces were cancelable, then we may not need such a special
case.

The coverage checks can be more sophisticated, but for the time being, I
think it is worth going with a simple anchor check.
Related: bug 511258

M  +120  -1    autotests/integration/activation_test.cpp
M  +23   -0    src/activation.cpp

https://invent.kde.org/plasma/kwin/-/commit/dac404549b5fe47b32722bfae9e49b5d24d45a36
Comment 5 Vlad Zahorodnii 2026-01-27 12:03:05 UTC
Git commit 598a28f50a9ca26bb40a3fb7c2194aec5469ebfc by Vlad Zahorodnii.
Committed on 27/01/2026 at 07:26.
Pushed by vladz into branch 'Plasma/6.6'.

Allow activation fullscreen overlays without tokens

If a fullscreen overlay layer surface is shown, allow activation
requests from it even without an activation token because it will be
painted above normal windows anyway.

If layer surfaces were cancelable, then we may not need such a special
case.

The coverage checks can be more sophisticated, but for the time being, I
think it is worth going with a simple anchor check.
Related: bug 511258


(cherry picked from commit dac404549b5fe47b32722bfae9e49b5d24d45a36)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +120  -1    autotests/integration/activation_test.cpp
M  +23   -0    src/activation.cpp

https://invent.kde.org/plasma/kwin/-/commit/598a28f50a9ca26bb40a3fb7c2194aec5469ebfc