Bug 427124 - Window sizes are not correctly restored on Wayland
Summary: Window sizes are not correctly restored on Wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.22.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
: 428051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-29 18:48 UTC by Patrick Silva
Modified: 2022-02-18 15:55 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
vlad.zahorodnii: Wayland+
vlad.zahorodnii: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-09-29 18:48:36 UTC
SUMMARY
This issue can also be reproduced with non-KDE Qt5 (tested qBittorrent) and gtk3 (tested Gedit text editor) apps running natively on Wayland.

STEPS TO REPRODUCE:
1. start Wayland session
2. open Kate
3. resize Kate window by dragging its borders
4. close Kate
5. reopen Kate (Kate is not maximized, as expected)
6. maximize Kate
7. close Kate
8. reopen Kate (Kate opens maximized, as expected)
9. restore Kate window by clicking on "Restore" button in its title bar

OBSERVED RESULT
the button clicked in the last step indicates that Kate window was restored but it is still occupying the whole screen

EXPECTED RESULT
Kate window should be restored to the size set via manual resizing in the step 3

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
my kwin was built today from source code
Comment 1 Claudius Ellsel 2020-10-17 13:57:09 UTC
The same problem was described in https://bugs.kde.org/show_bug.cgi?id=409919#c0, although the scope of that issue seems to be a different one now.
Comment 2 Vlad Zahorodnii 2020-10-17 17:42:28 UTC
Confirmed. KWin doesn't know the previous size of kate, so it needs to send a configure event with a width and a height of 0.
Comment 3 Patrick Silva 2020-10-21 19:22:23 UTC
*** Bug 428051 has been marked as a duplicate of this bug. ***
Comment 4 Till Schäfer 2021-03-18 12:45:03 UTC
I can confirm this bug under wayland. X11 is working fine. 

Operating System: Gentoo Linux
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.7-gentoo
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4810MQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 5 Nate Graham 2021-09-24 20:56:35 UTC
On Wayland, are apps still allowed to set their own window sizes? I know they can't for their position, but what about window size? If so, I can probably fix this in kxmlgui.
Comment 6 Bug Janitor Service 2021-10-30 12:29:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1589
Comment 7 Vlad Zahorodnii 2022-02-18 10:25:59 UTC
Should be fixed in 5.24
Comment 8 Claudius Ellsel 2022-02-18 15:55:30 UTC
(In reply to Vlad Zahorodnii from comment #7)
> Should be fixed in 5.24

Hm, not sure. I think I didn't see improvement when I checked.