Bug 451333 - Windows open in awkward sizes when the display resolutions are not equal
Summary: Windows open in awkward sizes when the display resolutions are not equal
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 5.24.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, usability
Depends on:
Blocks:
 
Reported: 2022-03-09 19:40 UTC by Antti Savolainen
Modified: 2024-03-16 23:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Savolainen 2022-03-09 19:40:56 UTC
SUMMARY
Demonstrative video: https://youtu.be/daE9rQ4546c
When you have two monitors with non-matching resoltions, certain applications like dolphin and konsole open in an awkward size.

STEPS TO REPRODUCE
1. Have two monitors with different resolutions. Possibly different aspect ratios as well
2. Open dolphin or konsole in both of them

OBSERVED RESULT
One of the displays will have an application with an awkward size

EXPECTED RESULT
The window should adapt to the size of the display it is opened in

SOFTWARE/OS VERSIONS

Linux: Arch Linux
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2022-03-23 13:57:09 UTC
1. X11 or Wayland?
2. What scale factor(s) are you using?
3. What window placement mode are you using (in System Settings > Window Management > Window Behavior > Advanced)
Comment 2 Antti Savolainen 2022-03-23 14:23:42 UTC
1. X11
2. 100%
3. Centered

Most of my settings are what Arch Linux Plasma comes with.
Comment 3 Nate Graham 2022-03-23 22:38:14 UTC
Gotcha. So it seems like the issue is that KWin thinks the viewport is too small to center the window, so it maximizes it instead. I guess it makes that calculation based on the size of the wrong screen.

Does this all work properly on Wayland, or is it broken for you there too?
Comment 4 Antti Savolainen 2022-03-24 11:27:35 UTC
I'm unable to test that. Wayland doesn't let me past the login screen.
Comment 5 Bug Janitor Service 2022-04-08 04:34:57 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2022-04-23 04:35:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 7 Antti Savolainen 2023-06-25 21:24:49 UTC
Finally getting back to this. I found the cause of the issue. If the unmaximized size is stretched to the full screen of the larger screen, the window will go over the edges on the smaller screen if opened on that. This happens on wayland as well. 

I think the solution should be that the unmaximized size of a window should be clamped to the maximum available space on that window
Comment 8 Nate Graham 2023-07-26 20:30:07 UTC
Are you seeing this still happening with Plasma 5.27?

Also, is the Wayland session working for you now? If so, can you try it there too?

Thanks a lot!
Comment 9 Antti Savolainen 2023-07-26 20:53:15 UTC
Happens in 5.27.6 and also happens in wayland. I recorded another demonstrative video: https://www.youtube.com/watch?v=l-ObLhtWX4Q
The issue is simply that the unmaximized windows aren't clamped to the size of the screen they spawn in. With mismatched screen sizes that can cause problems.
Comment 10 Antti Savolainen 2023-10-24 21:15:21 UTC
This issue is now even more pronounced now that I have mixed 144p and 1080p monitors.
Comment 11 Nate Graham 2024-01-18 22:22:27 UTC
I'm unable to reproduce the issue in Plasma 6 Wayland. It's possible that the issue has been fixed.
Comment 12 Antti Savolainen 2024-01-19 04:33:49 UTC
I'll do some testing later. Thanks.
Comment 13 Antti Savolainen 2024-01-23 17:59:53 UTC
I switched to the kde-unstable repo on Arch and I can confirm that the the issue is no longer present. Windows now get clamped to the size of the screen they spawn in.
Comment 14 Antti Savolainen 2024-03-16 23:39:09 UTC
Odd. Okteta still spawns over the screen borders and it doesn't remember the size it was last closed in? https://www.youtube.com/watch?v=Xr5OMsy-b7M

Should I reopen this issue?