Bug 514840 - pcmanfm-qt doesn't provide activation token on Wayland: existing Kate instance isn't raised when opening a file from pcmanfm-qt
Summary: pcmanfm-qt doesn't provide activation token on Wayland: existing Kate instanc...
Status: CLOSED DOWNSTREAM
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.12.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL: https://github.com/lxqt/pcmanfm-qt/is...
Keywords:
Depends on:
Blocks: 460318
  Show dependency treegraph
 
Reported: 2026-01-19 19:42 UTC by Alberto Salvia Novella
Modified: 2026-02-02 19:45 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Salvia Novella 2026-01-19 19:42:51 UTC
SYSTEM
- Plasma 6.5.5
- Frameworks 6.22.0
- Qt 6.10.1
- Wayland
- Zenned OS

STEPS
1. In System Settings, set "focus stealing prevention" to "low".
2. Open Kate.
3. Using the file manager, open a plain text file on Kate.

RESULT
- The Kate window doesn't rise.

RELATED
- With focus stealing prevention set to "Medium", some newly spawned windows (including Yakuake) don't get focus anymore: https://bugs.kde.org/show_bug.cgi?id=509990
Comment 1 Nate Graham 2026-01-31 14:35:26 UTC
Works for me. Which file manager are you using?

Does it reproduce in a new clean user account on the same computer?
Comment 2 Nate Graham 2026-01-31 14:43:05 UTC
Oh, one more question, since the original steps to reproduce aren't clear about it:

> Using the file manager, open a plain text file on Kate.
Are you simply single-double clicking the file to open it? Or are you dragging it onto Kate or its Task manager icon?
Comment 3 Alberto Salvia Novella 2026-01-31 16:56:50 UTC
It happens by clicking on the file to open it.

It happens with pcmanfm-qt, and it doesn't with dolphin.

It happens on kwin_wayland, it doesn't on kwin_x11.
Comment 4 Nate Graham 2026-01-31 17:52:37 UTC
I suspected you might be using Dolphin. Because it works with Dolphin, we can see that it's an issue with pcmanfm-qt, right?

The way cross-app activation works on Wayland is that both the sending and receiving app need to correctly implement the https://wayland.app/protocols/xdg-activation-v1 protocol. Ad we can see, Dolphin does, but pcmanfm-qt doesn't.

As a workaround until pcmanfm-qt gains that, you can set the focus stealing prevention setting to "none".
Comment 5 Alberto Salvia Novella 2026-02-01 01:35:26 UTC
Reported downstream at:
https://github.com/lxqt/pcmanfm-qt/issues/2137
Comment 6 Christoph Cullmann 2026-02-01 17:41:49 UTC
I chimed in on

https://github.com/lxqt/pcmanfm-qt/issues/2137
Comment 7 Alberto Salvia Novella 2026-02-02 01:33:19 UTC
Yet Kwin can detect this situation on X11, but not on Wayland.

I would first resolve the conversation on:
https://github.com/lxqt/pcmanfm-qt/issues/2137
Comment 8 Nate Graham 2026-02-02 01:37:09 UTC
As I mentioned in a comment over there, it's because cross-window activation works differently on X11 compared to how it does on Wayland.

And based on the rest of the conversation, I'm confident this is a pcmanfm-qt issue, not a KWin issue.
Comment 9 Christoph Cullmann 2026-02-02 06:32:32 UTC
Yeah, no token, no raise. If pcmanfm doesn’t add code to pass one (or uses the right glib api if there is any), no chance.
Comment 10 Christoph Cullmann 2026-02-02 18:29:53 UTC
https://github.com/lxqt/pcmanfm-qt/issues/2137 shows that there is no interest to have that, I would propose to not use pcmanfm-qt if you want to have some security by focus stealing prevention and still a proper experience with Kate & Co.

But that is up to the user. We did what we could.
Comment 11 Alberto Salvia Novella 2026-02-02 19:45:27 UTC
The security benefits of "focus stealing prevention" look pretty small.