SUMMARY *** Overlap prevention on applications remembering their window positions does not take effect on windows that have not been moved. *** STEPS TO REPRODUCE 1. Window Behavior settings: set Allow apps to remember their positions 2. Open a KDE application 3. Open a second instance of the same application OBSERVED RESULT The new instance completely overlaps the existing instance in the following cases: - When a window is opened in a location that avoids overlap with an existing moved window, all subsequent windows overlap that second window. - When a window that has been moved is moved back into its original position, all further windows overlap it. - When all windows are closed, all new windows open in the remembered location (notably, if any window has been moved before it got closed, the location of the new windows will be the location of that moved window, even if it was not the last one to be active), overlapping. The new instance does not overlap the existing instance in the following cases: - When a window is moved, windows ones opened after that do not overlap the first window. EXPECTED RESULT New instances never completely overlap existing instances. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Could this be related to https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/105?
I had a look at the code that introduced the overlap prevention (https://invent.kde.org/frameworks/kxmlgui/-/commit/ab43b986f3de20ff15b6438e56bfe29428bee3b1) and couldn't find anything wrong with it, but noticed that the entry `RestorePositionForNextInstance` in the application's configuration file doesn't change when according to the code it should; it does not get deleted when the window is closed. Could it be that the reason the overlap prevention didn't take effect in the cases described here is that the restore position flag just never was correctly saved, and that the above-mentioned MR would fix this? A thread in that MR mentions the position restoration feature, but I don't have a deep enough knowledge about how the configuration handling works to tell for sure.
Ah yes, that seems quite likely. Good catch. Feel free to submit a merge request to fix it!
Isn't this covered by the above mentioned MR? I can no longer reproduce this bug on the most recent stable Plasma version.
... on my own setup that is, but not on my test user account it seems. I'll look into it again and come back to this.
I can no longer reproduce it, I think it's been fixed.
Thanks for following up!