Bug 435357 - KWin no longer remebers window sizes and position, applications always open on the top left corner
Summary: KWin no longer remebers window sizes and position, applications always open o...
Status: RESOLVED DUPLICATE of bug 15329
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.3
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugzilla.redhat.com/show_bug....
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-04 19:41 UTC by Alice McLafferty
Modified: 2021-12-28 01:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alice McLafferty 2021-04-04 19:41:16 UTC
SUMMARY
On Fedora 34 beta (kwin 5.21.3), KWin no longer remembers the window position on Fedora 34 (KDE Spin). Applications will always open on the top left corner of the leftmost monitor. 

STEPS TO REPRODUCE
1. Install F34 KDE spin
2. Open any window, move it to somewhere else or resize it, then close it.
3. Reopen that application.

OBSERVED RESULT
Applications always open on the top left corner of the leftmost monitor.


EXPECTED RESULT
Window position and sizes are remembered like they were with kwin-5.20.5-1.fc33


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 34
(available in About System)
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I have two monitors attached to the system. This feature was functional on Fedora 33 since the very beginning.

This bug is always reproducible, under both X11 and Wayland sessions. I have found no options to enable/disable this behavior in system settings. Only workaround I've found is to set custom window rules for every single application, which is physically impossible to do in practice. I susupect this is a Fedora specific issue, but I have not had the chance to try out another distro. I tried reading some of the config files in my home directory but was unable to find any clues either.
Comment 1 David Edmundson 2021-04-04 21:35:32 UTC
Kwin never remembered the size and position of windows.
Comment 2 Alice McLafferty 2021-04-04 21:56:47 UTC
Is this filed under the wrong component then? 
Maybe this is relevant? https://bugs.kde.org/show_bug.cgi?id=415150
Comment 3 Nate Graham 2021-04-04 23:55:29 UTC
Which windows are we talking about? KDE app windows or 3rd-party app windows or all of them? What is your Window Placement option in System Settings > Window Management > Advanced? If the leftmost window not the primary one? Does the problem go away if you have only one monitor?

I suspect this is Bug 427875, but need to be sure.
Comment 4 Alice McLafferty 2021-04-05 00:07:35 UTC
> Which windows are we talking about? KDE app windows or 3rd-party app windows or all of them?

All windows are affected, including KDE applications such as Kate or Dolphin. The _size_ of them seems to be retained, but the positions are not.

> What is your Window Placement option

Window Management -> Window Behavior -> Advanced -> Window Placement is set to "Minimal Overlapping" (default). Setting them to "center" makes it a little bit more tolerable to use temporarily.

> If the leftmost window not the primary one? Does the problem go away if you have only one monitor?

Do you mean monitor? In Wayland session I have no way of setting a "primary monitor" (there is no such option in settings), and I can reproduce this with only a single monitor attached to the system as well. (physically disconnected the other display and re-logged in as well, just to be sure)
Comment 5 Nate Graham 2021-04-05 00:10:02 UTC
On Wayland, lack of position memory is expected, as it requires Bug 15329 to be implemented, and this has not happened yet. So position memory right now only works on X11, and only with KDE app windows (not 3rd-party app windows). Can you try with Dolphin, Gwenview, or Okular on X11?
Comment 6 Alice McLafferty 2021-04-05 00:27:21 UTC
> On Wayland, lack of position memory is expected

That is unfortunate, initially I thought this was a kwin feature (thus the bug report). So currently "everything opens on the top left corner" is the expected behavior with "Minimal Overlapping" in a wayland session?

Additionally, I have tested this in an x11 session, and position + size do work correctly for KDE applications such as dolphin or ark. 3rd party applications unfortunately do not, and I was not aware of this being expected behavior either.
Comment 7 Nate Graham 2021-04-05 00:36:05 UTC
(In reply to Alice McLafferty from comment #6)
> > On Wayland, lack of position memory is expected
> 
> That is unfortunate, initially I thought this was a kwin feature (thus the
> bug report).
On X11, it is not feasible to implement in KWin, which is why I implemented in KXMLGUI for KDE apps only. It's an imperfect solution, I know. :/

> So currently "everything opens on the top left corner" is the
> expected behavior with "Minimal Overlapping" in a wayland session?
Yes, "Minimal overlapping" positions the first window in the corner so that the next-opened window can be positioned as far as possible away from it, to make them overlap as little as possible (hence the name). If you don't like this, you might consider changing the positioning mode to "Centered" or something else.

> Additionally, I have tested this in an x11 session, and position + size do
> work correctly for KDE applications such as dolphin or ark. 3rd party
> applications unfortunately do not, and I was not aware of this being
> expected behavior either.
OK that's good. So the X11 feature is working correctly within its limitations. :)

Marking as a duplicate of Bug 427875, which requests a better version of the feature on Wayland which would apply to all windows automatically.

*** This bug has been marked as a duplicate of bug 427875 ***
Comment 8 Nate Graham 2021-04-05 00:36:40 UTC
Oops I mean Bug 15329.

*** This bug has been marked as a duplicate of bug 15329 ***
Comment 9 Alice McLafferty 2021-04-05 00:53:18 UTC
Guess this is currently unimplemented on wayland and unfixable on x11 then, thank you for the explanations.
Comment 10 Nate Graham 2021-04-05 00:55:51 UTC
You're welcome!