Bug 461184 - The Kate session runner reuses the current Kate instance
Summary: The Kate session runner reuses the current Kate instance
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-30 01:38 UTC by Louis Moureaux
Modified: 2022-11-02 20:07 UTC (History)
2 users (show)

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


Attachments
Screencast demonstrating the bug (2.69 MB, video/webm)
2022-10-30 16:18 UTC, Louis Moureaux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Moureaux 2022-10-30 01:38:00 UTC
SUMMARY

Using the Kate session runner to open a session when Kate is already running closes the currently open Kate session and replaces it with the requested session. It should open a new Kate instance instead.

STEPS TO REPRODUCE
1. Create two sessions in Kate
2. Close Kate
3. Open the first session
4. Open the second session directly from KRunner

OBSERVED RESULT

The open Kate instance switches to the second session.

EXPECTED RESULT

A new Kate window appears with session 2. The window with session 1 isn't affected.

SOFTWARE/OS VERSIONS

KDE Plasma: 5.26.2 (Arch Linux)
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Wayland

ADDITIONAL INFORMATION

There's a 10-years-old bug reporting the same issue (https://bugs.kde.org/show_bug.cgi?id=222987), but I doubt it's related.
Comment 1 Alexander Lohnau 2022-10-30 07:51:37 UTC
I can not reproduce and don't seem to have any special setting in regard to starting new instances. I will ask the Kate devs if there are any settings that I overlooked, which might be related.
Comment 2 Eric Armbruster 2022-10-30 09:56:41 UTC
I can reproduce. It does not matter whether you open the first session from session runner or in another way.
Comment 3 Eric Armbruster 2022-10-30 09:58:59 UTC
Actually it does matter. When you start both sessions from the kate session desktop widget it works as expected
Comment 4 Alexander Lohnau 2022-10-30 15:35:45 UTC
Can you please attach a recording?
Comment 5 Louis Moureaux 2022-10-30 16:18:57 UTC
Created attachment 153335 [details]
Screencast demonstrating the bug
Comment 6 Louis Moureaux 2022-10-30 16:19:03 UTC
It indeed does work as intended when you type "kate" in the KRunner search box and select one of the results. The bug appears only if you search for your session by name.

I made a recording where I have a session open ("fcweb") and I open another one ("pyciv") twice: the first time by typing "kate" in the search field, the second time by typing "pyciv". The first attempt works as expected, the second shows the bug.
Comment 7 Alexander Lohnau 2022-11-01 06:20:02 UTC
Can confirm. Though that is an entirely different component than the KRunner plugin for Kate sessions ;)
Comment 8 Bug Janitor Service 2022-11-01 06:31:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/991
Comment 9 Alexander Lohnau 2022-11-02 20:06:11 UTC
Git commit ec25d9f636b993bc2da91c3d20dfe632c72a21a7 by Alexander Lohnau.
Committed on 02/11/2022 at 20:05.
Pushed by alex into branch 'master'.

katesessionmanager: Make Actions of desktop file start new instance of Kate

Otherwise, we attach to an existing instance.
The runner and Applet also start a new instance.

M  +1    -1    apps/lib/session/katesessionmanager.cpp

https://invent.kde.org/utilities/kate/commit/ec25d9f636b993bc2da91c3d20dfe632c72a21a7
Comment 10 Alexander Lohnau 2022-11-02 20:07:30 UTC
Git commit 1a629295e3bdbf253e850e71b65b50cd2d14f7c7 by Alexander Lohnau.
Committed on 02/11/2022 at 20:07.
Pushed by alex into branch 'release/22.08'.

katesessionmanager: Make Actions of desktop file start new instance of Kate

Otherwise, we attach to an existing instance.
The runner and Applet also start a new instance.


(cherry picked from commit ec25d9f636b993bc2da91c3d20dfe632c72a21a7)

M  +1    -1    apps/lib/session/katesessionmanager.cpp

https://invent.kde.org/utilities/kate/commit/1a629295e3bdbf253e850e71b65b50cd2d14f7c7