Created attachment 116311 [details] video showing the bug I've discovered a weird bug with Kate where it will not remember its new size when resized on a secondary monitor. It seems that having a different vertical resolution on the secondary monitor might be necessary to make this bug occur. The attached video demonstrates this problem, and was recorded with KDE neon Developer Edition Git-Unstable running in VirtualBox. STEPS TO REPRODUCE 1. On a system with two monitors, open Kate and drag it to the secondary monitor. 2. Resize Kate. 3. Close and re-open Kate. OBSERVED RESULT Kate opens at the size previous to the resize in step 2. EXPECTED RESULT Kate should open at the size it was resized to in step 2. SOFTWARE/OS VERSIONS OS: KDE neon Developer Edition Git-Unstable (available in About System) KDE Plasma Version: 5.14.80 KDE Frameworks Version: 5.53.0 Qt Version: 5.11.2 ADDITIONAL INFORMATION Resizing Kate on the primary monitor properly restores the size on app relaunch. Using KWin's window-specific settings to apply a specified size on app launch does not work at all, so it would appear that Kate is handling its window size independently of KWin.
Kate uses KWindowConfig::saveWindowSize() and KWindowConfig::restoreWindowSize(); looking at the code this is the expected behaviour, KWindowConfig saves both the width of the screen and the width of the window, the same goes for the height. So IIUC, saving/restoring a window size is tied to the screen dimensions. Closing as not a bug, feel free to reopen it if you don't agree.
Regardless of the method used to store the window dimensions, Kate is not remembering the last size in a multi-monitor setup with different resolutions per monitor, so therefore the bug is still valid.
Created attachment 120735 [details] video showing repro method in VirtualBox This bug is still present in current Git (Kate package version in KDE neon Developer Edition: 4:19.04.2+p18.04+git20190606.1109-0). I have attached a new video showing how to repro this bug consistently in Virtualbox. Here's how: 1. Configure the VM for two monitors. 2. Set the primary and monitor to 800 x 600 and the secondary monitor to 1024 x 768. 3. Open Kate, drag it to the second monitor and resize it, then close it. 4. Open Kate again. Result: Kate does not remember the new size. Is there a way to stop Kate from remembering its window size altogether? I have set KDE's window rules to enforce a specific screen location and size on startup, but Kate overrides this with its own values, and combined with this bug makes for a frustrating experience.
I have tested this bug on my dual monitor system. I am seeing the exact same behaviour as shown in the video. Two colleagues of mine who also use KDE can confirm this bug also. This bug occurs with other KDE applications (such as Dolphin and Okular) too, not just Kate. In my case, my primary montior is to the right of my secondary monitor. This means that I have to move a window to my secondary monitor and resize it there before it will remember that size the next time I start it. This interrupts my workflow and makes the desktop unpleasant to work with. I switched the positions of my monitors in KDE's settings (the primary monitor is now to the left of the secondary monitor) and the behaviour is now reversed: window sizes are only remembered when changed on the primary (left) monitor.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfig/-/merge_requests/101
According to my tests (two screens with different resolutions), this bug has been fixed.