This is an annoying "bug" that appears when you use Plasma activities. How to reproduce: * Create two activities in Plasma, A and B * Switch to A * Open an instance of Kate * Switch to B * Open Dolphin (or any other file manager) * Open a text file (e.g., "text.txt") Expected result: Kate opens a new instance in B with "text.txt" Actual result: Kate opens "text.txt" in the already opened window in A, and the activity is switched. At the moment I have to manually open a new instance of kate in B before opening the file, but when I forget it is annoying, because I have to close the tab in A, switch back to B, open a new instance and, finally, open my file.
Created attachment 113672 [details] This is a patch I created that fixes the problem. The attached patch fixes the problem. I tested it in my environment (Plasma 15.13), but I think it should be tested also (i) in Wayland (without activities) and (ii) in a different DE. What I did is the following: 1) added a QDBus service to get the activities linked to a kate instance 2) added a check in the main in which, after all the other checks, if it still wants not to create a new instance, it makes sure that at least one of the currently running instances is in the current activity. If no instance is in the current activity, it forces a new instance.
Thanks for the patch Simone! Could you please add it to Phabricator so developers can review it? https://phabricator.kde.org/differential/diff/create/
I believe he did: https://phabricator.kde.org/D13826
Git commit cdb3da47ccda1c0600bbeb6c6a73180b9a3b9754 by Christoph Cullmann, on behalf of Simone Scalabrino. Committed on 12/08/2018 at 11:42. Pushed by cullmann into branch 'master'. Support activities when opening files Differential Revision: https://phabricator.kde.org/D13826 M +15 -0 kate/kateapp.cpp M +7 -0 kate/kateapp.h M +4 -0 kate/kateappadaptor.cpp M +7 -0 kate/kateappadaptor.h M +37 -1 kate/main.cpp https://commits.kde.org/kate/cdb3da47ccda1c0600bbeb6c6a73180b9a3b9754