Bug 486066 - Window management broken
Summary: Window management broken
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 24.02.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-24 11:40 UTC by Johannes
Modified: 2024-04-27 15:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes 2024-04-24 11:40:47 UTC
The window management of Kate has changed recently. It completely breaks working with multiple projects on multiple virtual desktops simultaneously. 

STEPS TO REPRODUCE
1. Open a document with Kate on virtual desktop 1
2. Switch to another virtual desktop, say 2
3. Open a document there

OBSERVED RESULT
The document opens in the already existing kate instance on virtual desktop 1. The window manager switches back to virtual desktop 1. 

EXPECTED RESULT
A new kate window appears on virtual desktop 2 with the newly opened document.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
X11

Also tested on XFCE/KWin and on LXQT. Also tested with a fresh user account to rule out any odd settings.

ADDITIONAL INFORMATION

I've been using Kate for more than 10 years now. The changed window management makes it absolutely impossible to use Kate on multiple virtual desktops with multiple open projects. When clicking a file in dolphin it shouldn't matter if there is an open Kate window on *some other* virtual desktop with *a completely unrelated* project open. 

Consider you're working on some C project on virtual desktop 1. You created a .kateproject to manage files, set up the lsp server and have lots of .c and .h open in the Kate window. 
Now you switch to another virtual desktop and need to look in a piece of python that is in no way related to the C project. Maybe you got a phone call and someone is asking. So you open up dolphin, navigate to the project and click the .py file you want. It suddenly appears in your open C project somewhere between the 10 open tabs you were working on before. Also you're suddenly back on virtual desktop 1. 

Also the "Behaviour -> Open each document in its own window" option doesn't help as Kate now opens a new window even if you drag a file onto an existing Kate window. The option makes it impossible to have more than one tab.
Comment 1 Christoph Cullmann 2024-04-25 16:14:24 UTC
I think it is my fault that this regressed, I can take a look to restore that.
Comment 2 Bug Janitor Service 2024-04-25 17:40:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1474
Comment 3 Christoph Cullmann 2024-04-25 17:41:29 UTC
Can you try the linked patch?
Comment 4 Johannes 2024-04-25 20:37:10 UTC
Thumbs up for the fast response! I was afraid this might be some intended change, read somewhere on discuss.kde.org that the window management was changed ("for the better") and had the gnome story in front of my eyes...

The patch works for me. Thanks again for the fast fix, kate has become somewhat irreplaceable for me.
Comment 5 Christoph Cullmann 2024-04-26 07:28:31 UTC
Git commit 7e6ec2ba8fb2bdf9f106670273f102459e8b962f by Christoph Cullmann.
Committed on 26/04/2024 at 07:24.
Pushed by cullmann into branch 'master'.

use kate from the right virtual desktop

M  +2    -1    apps/kate/main.cpp
M  +22   -0    apps/lib/kateapp.cpp
M  +2    -5    apps/lib/kateapp.h
M  +1    -1    apps/lib/kateappadaptor.h
M  +1    -1    apps/lib/katerunninginstanceinfo.cpp

https://invent.kde.org/utilities/kate/-/commit/7e6ec2ba8fb2bdf9f106670273f102459e8b962f
Comment 6 Christoph Cullmann 2024-04-26 07:32:18 UTC
Git commit a89ed4a84a239941e3eaefe6ee1c2426b85afb85 by Christoph Cullmann.
Committed on 26/04/2024 at 07:32.
Pushed by cullmann into branch 'release/24.05'.

use kate from the right virtual desktop


(cherry picked from commit 7e6ec2ba8fb2bdf9f106670273f102459e8b962f)

M  +2    -1    apps/kate/main.cpp
M  +22   -0    apps/lib/kateapp.cpp
M  +2    -5    apps/lib/kateapp.h
M  +1    -1    apps/lib/kateappadaptor.h
M  +1    -1    apps/lib/katerunninginstanceinfo.cpp

https://invent.kde.org/utilities/kate/-/commit/a89ed4a84a239941e3eaefe6ee1c2426b85afb85
Comment 7 Christoph Cullmann 2024-04-27 15:12:54 UTC
(In reply to Johannes from comment #4)
> Thumbs up for the fast response! I was afraid this might be some intended
> change, read somewhere on discuss.kde.org that the window management was
> changed ("for the better") and had the gnome story in front of my eyes...
> 
> The patch works for me. Thanks again for the fast fix, kate has become
> somewhat irreplaceable for me.

Thanks for the good report here, was broken by accident by me, hope this will make 24.05 again usable for you!