SUMMARY Not sure if this is actually specific to kwrite, that's generally all I use. Plasma is configured to restore my previous session on start, so all of my files that were open in kwrite before shutdown should be reopened. Some time in the last month or so, kwrite got a new splash screen that shows a list of recent documents, and it broke session restore. Instead of reopening my files, it reopens the same number of kwrite windows, but only showing the splash screen. It also always shows the toolbars which I've hidden. STEPS TO REPRODUCE 1. go to System Settings > Startup and Shutdown > Desktop Session, set 'when logging in' to 'restore last session' 2. open any file in kwrite 3. go to the settings menu and hide the toolbars 4. reboot OBSERVED RESULT After rebooting, kwrite displays toolbars and list of recent documents EXPECTED RESULT After rebooting, kwrite displays previously opened file and toolbars remain hidden SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch KDE Plasma Version: 5.26.4 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 ADDITIONAL INFORMATION
Am having the same (or similar) issue. After a recent upgrade (kwrite:amd64 4:22.04.3-1 -> 4:22.12.0-2) Kwrite no longer remembers what files it had open before logging out of KDE or rebooting the PC. If I had, for example, two files open in Kwrite in two separate windows before logging out of KDE, when logged back into KDE, KDE would open two empty Kwrite windows instead of properly showing the files that used to be in those windows. Other apps (for example, Okular) properly open files they had open before logging out of KDE after logging back into KDE. Operating System: Debian 12 Bookworm GNU/Linux KDE Plasma Version: 5.26.4 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.6 Kernel Version: 6.0.0-6-amd64 (64-bit) Graphics Platform: X11 ADDITIONAL INFORMATION https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026307
This looks very much like a regression of the new tab support in KWrite. On the first login after the upgrade to 22.12, I had hoped that this is just a one-off problem because each instance of KWrite now has to remember a list of open documents instead of just one document. But apparently, this is just broken and not just an upgrade issue.
Does the session restore work for Kate?
Yes, for Kate it works as good as before the upgrade regardless of whether I use a named session or just a bunch of files.
Hmm, ok, then I must have messed that up with some of the few divergences for KWrite mode. I skipped some restore steps but thought that should only affect the not used mdi stuff...
Could you try if this commit is the reason for that! https://invent.kde.org/utilities/kate/-/commit/5dac26e2b7747aab9a97a4eb516a83990d2122ed
Please try https://invent.kde.org/utilities/kate/-/merge_requests/1045
If somebody would try that, I could fix and backport it, else it stays broken.
(In reply to Christoph Cullmann from comment #8) > If somebody would try that, I could fix and backport it, else it stays > broken. I'm interested in the fix so I'd try it if you provide the affected lib/executable file to try with the instructions how to apply it. Don't have any setup to build KDE from source.
I tried your fix on the master branch and it solved the problem for me.
(In reply to Wolfgang Illmeyer from comment #10) > I tried your fix on the master branch and it solved the problem for me. Thanks a lot for the testing.
Git commit 4082f64a9695287ee87c712ef1287fabe8ee8c9b by Christoph Cullmann. Committed on 29/12/2022 at 13:26. Pushed by cullmann into branch 'master'. Fix session restore for KWrite M +6 -2 apps/lib/katemainwindow.cpp M +6 -1 apps/lib/katemainwindow.h M +4 -10 apps/lib/kateviewmanager.cpp M +3 -1 apps/lib/session/katesessionmanager.cpp https://invent.kde.org/utilities/kate/commit/4082f64a9695287ee87c712ef1287fabe8ee8c9b
Git commit a6c64ff86e9815b3f719880442dd9242f60380e6 by Christoph Cullmann. Committed on 29/12/2022 at 13:33. Pushed by cullmann into branch 'release/22.12'. Fix session restore for KWrite (cherry picked from commit 4082f64a9695287ee87c712ef1287fabe8ee8c9b) M +6 -2 apps/lib/katemainwindow.cpp M +6 -1 apps/lib/katemainwindow.h M +4 -10 apps/lib/kateviewmanager.cpp M +3 -1 apps/lib/session/katesessionmanager.cpp https://invent.kde.org/utilities/kate/commit/a6c64ff86e9815b3f719880442dd9242f60380e6
*** Bug 463720 has been marked as a duplicate of this bug. ***