KGeoTag's main window position is not restored

slbtty shenlebantongying at gmail.com
Sun May 26 17:14:12 BST 2024


It is not possible anymore in Wayland because window coordinates cannot be set.

On Sun, May 26, 2024 at 11:37 AM Tobias Leupold <tl at stonemx.de> wrote:
>
> Hi all!
>
> I'm a bit lost with this one. Maybe someone with more insight in KXmlGuiWindow
> could give me a hand about this? Most probably, this is PEBCAK ;-)
>
> Currently, KgeoTag's main window position is not restored when closing it and
> opening it again. The dock arrangement is restored, and also the window size
> -- but the window always appears always in the middle of the screen.
>
> Initially, I used a QMainWindow and stored the windowState() manually, to
> restore it in the main window's ctor. Later on, I ported the main window to
> KXmlGui, keeping the manual restore.
>
> I now noticed that KMainWindow also stores the window state on closing,
> although I never called setAutoSaveSettings(), along with some position
> parameters that are stored differently from what QWidget::saveGeometry() would
> yield.
>
> I now created the "xmlgui" branch, where the duplicate saving of the window
> state is removed, and setAutoSaveSettings() is called.
>
> However, neither with the master branch (without setAutoSaveSettings()), nor
> with the xmlgui branch (with setAutoSaveSettings(), most probably more the way
> this is intended to be used), the window's position is restored -- the window
> always appears in the middle of the screen.
>
> At this point, I'm completely out of ideas why this doesn't work and how I can
> fix it. has anybody an idea?!
>
> Thanks a lot for all hints!
>
> Cheers, Tobias
>
>


More information about the kde-devel mailing list