Bug 423191 - kate does not remember position and size on 2nd monitor
Summary: kate does not remember position and size on 2nd monitor
Status: RESOLVED DUPLICATE of bug 427875
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 20.04.2
Platform: Fedora RPMs Linux
: NOR normal with 20 votes (vote)
Target Milestone: ---
Assignee: KWrite Developers
Depends on:
Reported: 2020-06-18 22:41 UTC by slartibart70
Modified: 2022-10-19 15:40 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:

screen1 (3.54 KB, text/plain)
2020-07-06 13:37 UTC, slartibart70
screen2 (3.53 KB, text/plain)
2020-07-06 13:38 UTC, slartibart70

Note You need to log in before you can comment on or make changes to this bug.
Description slartibart70 2020-06-18 22:41:30 UTC
I'm using plasma 5.19.1.
When opening the kate editor on screen 1 (laptop display), resizing, closing and then re-starting kate, the kate window position and size is remembered.

In contrast, if i move kate to the second monitor (displayPort, 4K screen) and do the same (open/resize/close-reopen) then neither position nor window size is remebered. Instead, kate chooses to open in a 640x512px window size at random positions.

Move kate to screen 1 again and all is fine... as expected
Comment 1 slartibart70 2020-07-06 13:37:59 UTC
Created attachment 129934 [details]
Comment 2 slartibart70 2020-07-06 13:38:20 UTC
Created attachment 129935 [details]
Comment 3 slartibart70 2020-07-06 13:43:21 UTC
i attached two kate config files, the one with suffix _screen1 is captured on the laptop screen, where positioning and sizing works ok 
(open konsole on screen1, run 'kate', move/resize kate window, close it. Run 'kate' again, kate-window reappears at same position with correct size)

The file with suffix _screen2 is captured on the 4K monitor, same as above, run konsole on screen2 to start kate.

If kate was sized properly on laptop screen and closed, and you call kate from the konsole window on the second screen (4k monitor), then the initial size is as it was on screen one (obiviously, the window got sized somewhere on the 4k monitor, for me, in the upper left corner)

close kate, run it again, and you get the tiny 640x512px window on the 4k monitor
Comment 4 slartibart70 2020-07-06 13:44:52 UTC
> obiviously, the window got sized somewhere on the 4k monitor, for me, in the upper left corner)

should read:
obiviously, the window got positioned somewhere on the 4k monitor, for me, in the upper left corner)
Comment 5 Christoph Feck 2020-07-28 13:00:28 UTC
*** Bug 422604 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2020-09-21 04:57:46 UTC
This should be fixed in Frameworks 5.74. :) See the bug report I just marked this as a duplicate of.

*** This bug has been marked as a duplicate of bug 415150 ***
Comment 7 slartibart70 2020-09-21 07:47:47 UTC
sorry to say, but no, frameworks 5.74 does not fix it.
I'm on 
kf5-*.5.74.0 / fc32
kate 20.08.1

and still this problem with the 2nd monitor exists as described below.

When starting kate, i get
kf.kio.core: "Could not enter folder tags:/."
kf.kio.widgets.kdirmodel: protocol mismatch: "" vs "file"
Comment 8 Nate Graham 2020-09-21 18:57:09 UTC
Given that there were a bunch of changes in Frameworks 5.74, can you describe *exactly* what you're doing and what happens?
Comment 9 slartibart70 2020-09-21 20:28:48 UTC
Well, nothing too spectacular...
Just have a laptop (t470) which is defined as the main screen, attach a 4k display using displayport. Start kate on 4k screen (e.g from a konsole window on that monitor). Kate opens in a 640*512px wide window. 
Independent of resizing of kate, if you close kate and start kate again,  the main window is not keeping any sizing information and reopens in 640*512px.
If your 4k screen is the only screen, then kate behaves properly.

Strangely enough, this is specific to kate, kwrite works as expected keeping window sizes independent on which monitor it was started
Comment 10 slartibart70 2020-09-21 20:33:47 UTC
Btw, I don't have any application or window rules active
Comment 11 Nate Graham 2020-09-21 20:43:28 UTC
Thanks, can reproduce now. Maybe Kate has some special logic that needs to be removed now that the correct functionality comes from KXMLGui for free.
Comment 12 Nate Graham 2020-09-26 00:53:25 UTC
I've been investigating this. Though I can reproduce the problem, I haven't yet found anything that could be causing it.
Comment 13 Adomas Jackevičius 2020-09-26 14:15:31 UTC
Happens to me too, I have 2x screens with 200% scaling (4K) and Kate always starts somewhere like in 3rd monitor, which I don't have

KDE 5.74.0 / Plasma 5.19.5 / Qt 5.15.1
Comment 14 Riccardo Robecchi 2020-11-16 16:09:35 UTC
It happens to me as well. Two 1080p screens with 100% scaling, so it does not seem to be exclusive to high-DPI displays with >100% scaling.

OS: KDE Neon Focal
KDE Plasma 5.20.3
KDE Frameworks: 5.75.0
Qt 5.15.1
Comment 15 slartibart70 2021-03-14 00:12:21 UTC
any progress on this?
Still happening with plasma 5.21.2 and VERY annoying
Comment 16 Peter Tselios 2022-05-07 13:52:29 UTC
I have reported the same issue here: https://bugs.kde.org/show_bug.cgi?id=452595
So, I guess someone has to link those 2 bugs (and close mine as duplicate?). 

As a side note, I haven't seen this behavior to any other KDE application! Even non-KDE apps "remember" their position and size. KWrite, another editor that uses the katepart, is just fine, so I guess this is limited to kate and it's startup process?
Comment 17 slartibart70 2022-07-10 20:27:02 UTC
any updates on this?

i tested with wayland and a current kde version 5.25.2, frameworks 5.96, qt 5.15.3 
Neither on x11 nor in wayland is the kate editor behaving properly (in comparison to kwrite, there it works surprisingly well)
Comment 18 popov895 2022-08-22 08:32:30 UTC
Seems to be related to Bug 427875
Comment 19 Peter Tselios 2022-10-05 10:13:51 UTC
Also, I have 2 setups one Fedora 36 and one openSUSE Tumbleweed. The issue is present to both installations. 
F36 is connected to 3 screens (laptop + 2 externals), openSUSE has only one screen. 

So, this is not an issue about multimonitor setups. The issue appears in both Wayland and X11 and only on Kate. 
Konsole for example is fine, Kwrite is perfect etc etc.
Comment 20 slartibart70 2022-10-19 12:55:30 UTC
Operating System: Fedora Linux 36
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

those problems seem to be gone?
At least kate remembers position and size on the second screen?
This is unexpected, because this bug is still open.

I'm having an eye on kate's behaviour now...
Comment 21 Nate Graham 2022-10-19 15:40:32 UTC
On X11, this bug is fixed now, yeah. See Bug 427875.

*** This bug has been marked as a duplicate of bug 427875 ***