Bug 460283 - "Switch to instance" functionality does not cause the window for that instance to raise on Wayland
Summary: "Switch to instance" functionality does not cause the window for that instanc...
Status: CONFIRMED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 22.08.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 430754 (view as bug list)
Depends on:
Blocks: 460318
  Show dependency treegraph
 
Reported: 2022-10-12 08:55 UTC by Edward Oubrayrie
Modified: 2022-11-12 20:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Oubrayrie 2022-10-12 08:55:33 UTC
STEPS TO REPRODUCE
0. In a wayland session (tested with Plasma 5.26)
1. Start kate, minimize or hide it
2. Open kate from start menu. A window displays "Session 'x' is already opened in another Kate instance."
3. Click "Switch to instance"

Another scenario
0. In a wayland session (tested with Plasma 5.26)
1. Start kate, minimize or hide it
2. Open any kate file eg "foo.txt" from start menu.

OBSERVED RESULT
Kate window is not visible.

EXPECTED RESULT
Kate window is raised to forefront.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon  22.04
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Xref https://invent.kde.org/plasma/kwin/-/issues/39 for more examples.
protocol https://wayland.app/protocols/xdg-activation-v1
https://invent.kde.org/system/dolphin/-/merge_requests/461 for a similar dolphin fix.
Comment 1 Nate Graham 2022-10-12 16:04:29 UTC
Can reproduce.

Kate *generally* has activation support because its open window raises as expected when a file is opened by Ctrl+clicking on a path in Konsole. But it seems to be missing for the specific piece of functionality.
Comment 2 Christoph Cullmann 2022-11-12 17:54:13 UTC
(In reply to Nate Graham from comment #1)
> Can reproduce.
> 
> Kate *generally* has activation support because its open window raises as
> expected when a file is opened by Ctrl+clicking on a path in Konsole. But it
> seems to be missing for the specific piece of functionality.

If you have some hint how to fix this on Wayland I would like to try that, but I have no clue how to do so.

The API we use atm is without effect.
Comment 3 Christoph Cullmann 2022-11-12 20:03:48 UTC
*** Bug 430754 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Cullmann 2022-11-12 20:04:13 UTC
The message in the other bug stems from our use of API that no longer works.
Comment 5 Christoph Cullmann 2022-11-12 20:32:31 UTC
I got the info that one shall use

KWindowSystem::requestXdgActivationToken

and wait for

KWindowSystem::xdgActivationTokenArrived

and send this over to ensure one can activate, at least for this case.

If somebody has time to work that, that would be nice.