https://bugs.kde.org/show_bug.cgi?id=426725

Nate Graham <n...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/kxmlgui/commit/ab43b
                   |                            |986f3de20ff15b6438e56bfe294
                   |                            |28bee3b1
             Status|ASSIGNED                    |RESOLVED
   Version Fixed In|                            |5.75

--- Comment #16 from Nate Graham <n...@kde.org> ---
Git commit ab43b986f3de20ff15b6438e56bfe29428bee3b1 by Nate Graham.
Committed on 01/10/2020 at 22:43.
Pushed by ngraham into branch 'master'.

Don't overlap main windows when opening additional instances

Right now when restoring the position of main windows, we do it
unconditionally. This means that if you have a KXMLGui-using app
open and you open a new instance, the new instance gets position-
restored and totally overlaps the existing window. This is not
very nice.

With this commit, that issue is fixed.

Technical explanation: To accomplish this, now every time the
window position data is read, we write out a value to the config
file that indicates that we should not restore the position of the
next window to be opened. This ensures that after opening one
instance, the next one will never cover it up completely. Whenever
any window is closed, we clear the config file value so that the
next-opened window can once again restore the position of the last-
opened one.

This is functionally equivalent to clearing the position config
data on disk after reading it, but is simpler and does not result
in that data being lost if the app crashes (in which case the main
window wouldn't get closed nicely to write the data out again).

UX explanation: Apps where you regularly open multiple instances will
no longer overlap one another, and the last-closed instance will be
the one which gets its position saved. When you re-open that app
after closing all instances, it will remember the last position of
that window, but opening additional instances will let the window
manager position them according to its own window placement settings.
FIXED-IN: 5.75

M  +15   -30   src/kmainwindow.cpp
M  +0    -2    src/kmainwindow_p.h

https://invent.kde.org/frameworks/kxmlgui/commit/ab43b986f3de20ff15b6438e56bfe29428bee3b1

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to