Save and restore position of main window
This commit invokes the new
KWindowConfig::restoreWindowPosition() added to KConfig in
kconfig!14 (merged). As a
result, KDE apps using KXMLGui now automatically save and restore the
positions of their windows on a per-screen-arrangement basis.
This only affects the main window; sub-windows and dialog windows seem like they will need to be handled on an app-by-app basis as most apps currently manually invoke
KWindowConfig::restoreWindowSize() for those windows, and they will need to be ported to also invoke
KWindowConfig::saveWindowPosition() and KWindowConfig::restoreWindowPosition()` in the same places.
BUG: 415150 FIXED-IN: 5.74
- Open Dolphin
- Move its main window somewhere else on screen
- Close it
- Re-open it
See that it opened in the same position where you closed it!
- Do the same thing with Kate Okular, Konsole, and Spectacle
See that the same works for all of them too!
- Plug in a second screen and move the main window of one of those apps to the second screen
- Close that app and re-open it
See that it opened in the same position on the other screen!
- With the second screen still plugged in and one of those apps on the second screen, close that app
- Unplug the second screen
- Open that app again
See that it opened in the same position on the first screen that it opened in before the last time only this screen was active!