Bug 478964

Summary: Files from external apps always open in the first Kate instance
Product: [Applications] kate Reporter: Yevhen Popok <xalt7x.service>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph
Priority: NOR Keywords: usability
Version First Reported In: 23.08.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 24.02.0
Sentry Crash Report:

Description Yevhen Popok 2023-12-24 11:18:56 UTC
SUMMARY
Kate prefers to open files in tabs. However, it's also possible to launch a separate instances. Unfortunately, regardless of which Kate window was used last, new files opened from external programs (e.g. file manager) are always added to the initial Kate window.
Other applications (e.g. Firefox) open files in the last used/viewed window. That's more preferable behaviour for multi-tasking.

STEPS TO REPRODUCE
1. Launch Kate and open some file
2. Launch a new Kate instance (FIle - New Window) and open another file
3. Move second Kate instance to second virtual desktop
3. On the second virtual desktop launch file manager and there try to open text file with Kate

OBSERVED RESULT
Opened file is added on the initial Kate window so user have to switch back to another virtual desktop to see it


EXPECTED RESULT
Opened file is added to the last used Kate window

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 39
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11 (built against 5.15.10)
Comment 1 Christoph Cullmann 2023-12-26 21:00:06 UTC
https://invent.kde.org/utilities/kate/-/merge_requests/1381

will work on that
Comment 2 Christoph Cullmann 2023-12-29 16:47:28 UTC
Fixed in the Qt 6 based master version now. We now use the least recently used instance to open a file.