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

--- Comment #6 from Tiernan Hubble <thubble+kdeb...@thubble.ca> ---
(In reply to Oded Arbel from comment #4)
> I've reviewed the XDG activation
> (https://wayland.app/protocols/xdg-activation-v1) and I don't understand why
> this protocol would not allow any application to request focus by creating
> an activation token and using it immediately - the accompanying text only
> suggests that activation tokens *may* be unusable due to focus stealing
> prevention. The spec in no way requires the composer to implement focus
> detection or any focus stealing prevention algorithm, just that the
> activation protocol make it easier for a composer to implement such
> algorithms - if it wants to.

That would definitely make more sense if it's the case. I never actually looked
at the protocol docs, only the implementations that have been done (mainly
kwin). I haven't checked in detail since I posted my last comment, but I'm
pretty sure kwin still only considers an xdg activation token as "valid" if it
was requested by the currently-active window. A change in Plasma 5.24 made it
so that if an app tries to activate itself and it doesn't have a
currently-valid token, it will bounce the taskbar icon but not automatically
activate the window: https://invent.kde.org/plasma/kwin/-/merge_requests/2206 
- you can see this behaviour in Kate if you un-focus the Kate window and then
open a new file with "kate [file_name]" in a terminal.

In the comments of the main xdg_activation tracker issue
(https://invent.kde.org/plasma/kwin/-/issues/39) there's mention of the
currently-active window being able to pass its valid activation token when
requesting that another application activate itself. The problem with yakuake
is that it's not the currently-active application "passing" focus, it's the
hotkey. Unless there's some way in KGlobalAccel to do it?

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

Reply via email to