Bug 493401 - Kate does not restore its window position
Summary: Kate does not restore its window position
Status: REOPENED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: Git
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 484998 492082 495566 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-20 10:39 UTC by Atanas Uzunov
Modified: 2025-03-20 00:22 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Atanas Uzunov 2024-09-20 10:39:36 UTC
SUMMARY
Kate does not seem to restore the window position from the previous session on Windows 11. 
It looks that the RestorePositionForNextInstance option in <HOME>\AppData\Roaming\kate\katestaterc is always set to false on Kate exit.

STEPS TO REPRODUCE
1. Open Kate. Change main window size and position.
2. Close Kate.
3. Open again Kate.

OBSERVED RESULT
The windows size is restored but not the window position. The Kate window always opens in the middle of the screen.

EXPECTED RESULT
Kate window should open in the screen position of the last session.

SOFTWARE/OS VERSIONS
Windows: Windows 11 23H2
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
The behavior is observed with nightly build of Kate 24.11.70 (kate-master-7941), but I'm observing this from a long time ago with the official releases.
Comment 1 Atanas Uzunov 2024-09-20 14:33:21 UTC
Please ignore "The Kate window always opens in the middle of the screen.".
Comment 2 Christoph Cullmann 2024-09-25 16:50:20 UTC
*** Bug 484998 has been marked as a duplicate of this bug. ***
Comment 3 David de Cos 2024-10-15 11:26:18 UTC
This is not exclusive to Windows, I have it in openSUSE Tumbleweed:

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241002
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.11.0-1-default (64-bit)
Graphics Platform: X11
Comment 4 Bug Janitor Service 2024-10-15 12:20:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/239
Comment 5 Waqar Ahmed 2024-10-15 14:01:39 UTC
*** Bug 492082 has been marked as a duplicate of this bug. ***
Comment 6 Alexander Lohnau 2024-10-19 08:33:33 UTC
Git commit 99cd03cec0bc2738bd176836cc0794f14a7d5a60 by Alexander Lohnau, on behalf of Waqar Ahmed.
Committed on 19/10/2024 at 08:33.
Pushed by alex into branch 'master'.

Fix window position not being restored

Seems like a regression from 4eb7098a7b7b878b328b76c58d37607e75073d60

M  +1    -1    src/kmainwindow.cpp

https://invent.kde.org/frameworks/kxmlgui/-/commit/99cd03cec0bc2738bd176836cc0794f14a7d5a60
Comment 7 Waqar Ahmed 2024-10-30 06:19:44 UTC
*** Bug 495566 has been marked as a duplicate of this bug. ***
Comment 8 Bill Goodman 2024-11-15 16:33:56 UTC
(In reply to Alexander Lohnau from comment #6)
> Git commit 99cd03cec0bc2738bd176836cc0794f14a7d5a60 by Alexander Lohnau, on
> behalf of Waqar Ahmed.
> Committed on 19/10/2024 at 08:33.
> Pushed by alex into branch 'master'.
> 
> Fix window position not being restored
> 
> Seems like a regression from 4eb7098a7b7b878b328b76c58d37607e75073d60
> 
> M  +1    -1    src/kmainwindow.cpp
> 
> https://invent.kde.org/frameworks/kxmlgui/-/commit/
> 99cd03cec0bc2738bd176836cc0794f14a7d5a60

The bug persists after this fix. If the window is closed with the window's close icon, the position is remembered. If the window is closed when the close icon on a tab is clicked, the window position is forgotten.
Comment 9 Ben Cooksley 2024-11-15 17:49:21 UTC
Removing CC per abuse report received.
Comment 10 Bill Goodman 2025-03-20 00:22:36 UTC
On Windows, the window position is also incorrect after Kate is closed using the Quit command in the File menu.