Bug 459184 - XWayland applications do not become flagged as windowed when dragged to unmaximise on most displays
Summary: XWayland applications do not become flagged as windowed when dragged to unmax...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.25.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, regression, wayland-only
Depends on:
Blocks:
 
Reported: 2022-09-15 20:30 UTC by indecisiveautomator
Modified: 2024-07-26 03:46 UTC (History)
2 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 indecisiveautomator 2022-09-15 20:30:09 UTC
SUMMARY
This is a strange bug. I have a 4 displays, three on the bottom and one at the top in the middle. On 5.25 windowed would open on the window my mouse cursor was under, my primary display, or the window they were last opened on. With 5.25.90, X11 applications always open on my top display, which happens to be DP-1.

When I maximise and unmaximise X11 applications on this display, it works fine. But when I maximise them on *any* other display, they do not change resolution and are still flagged as maximised (though I can drag them around, even if their resolution hasn't changed). The maximise button icon on the window doesn't change. I can't drag to shrink them either as they still think they are maximised.

If I try to drag them to the top of the display to maximise them, that will unmaximise them. The rectangle for where they will unmaximise starts as a fullscreen grey rectangle, then shrinks down and moves diagonally up to the center of my top display, however when unmaximised the window stays on the display I tried to unmaximise it on.

Dragging the maximised window onto any other display will unmaximise it in this way too. For example, maximise it on any display it wasn't maximised on, then alt+drag it onto another display and try to maximise it by snapping it to the top of that display, and it will unmaximise it, since when you dragged it off the first display it was never actually marked as unmaximised.


STEPS TO REPRODUCE
1. Maximise a X11 application on a display it did not open on. 
2. Drag it down by the title bar or with an alt+drag.
3. It will move down, but it will not be unmaximised. The maximise icon will still show it as maximised.
4. Attempt to drag the window up to maximise it.
5. This will unmaximise the window. 

OBSERVED RESULT
X11 applications do not correctly flag themselves as unmaximised when maximised on a display they were not originally opened on.


EXPECTED RESULT
X11 applications should maximise and window themselves correctly on any display.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.19.8-zen1-1-zen (64bit)
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Comment 1 Vlad Zahorodnii 2022-09-16 06:43:12 UTC
Can you share a screenshot of your desktop (I'm mostly interested in panel layout)? Do you also have any scripts? Can you reproduce this issue in a new user account?

---

I tried to reproduce it but the window is maximized/unmaximized as expected on my setup (3 monitors).
Comment 2 indecisiveautomator 2022-09-16 14:24:11 UTC
No problem, Here is a screenshot of my desktop layout with the wallpaper marking the displayPort number: https://i.imgur.com/2jVd8C7.png 

All displays are 1080p except for the leftmost one which is a 4k display scaled at 150%. Panels are full-width and  at the top of each display. I don't have any scripts setup.

I didn't try on a new user account but I was able to "fix" the problem by selecting the "Scaled by the system" option for X11 applications in Display Configuration. So this problem only seems to occur when I select the "Apply scaling themselves" option.

I have a single-display laptop I can test the 5.26 Beta on later and see if the behaviour is the same.
Comment 3 indecisiveautomator 2022-09-16 14:29:06 UTC
Just noticed the text on the panels in the screenshots look blocky. This is probably just because the other monitor is high res, the text doesn't actually look that blocky in everyday use :-)
Comment 4 Nate Graham 2022-09-27 13:57:56 UTC
With a single screen, cannot reproduce with Discord running in XWayland mode. It does seem to be related to the multi-screen geometry.
Comment 5 indecisiveautomator 2022-10-15 21:56:09 UTC
This is still a problem in Plasma 5.26.0, but I don't use the "Apply scaling themselves" option so it's not really affecting me at all.
Comment 6 Nate Graham 2024-06-26 23:49:40 UTC
Still cannot reproduce in Plasma 6.1. Are you able to?
Comment 7 Bug Janitor Service 2024-07-11 03:47:06 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 8 Bug Janitor Service 2024-07-26 03:46:16 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!