Bug 459107 - Applications closed in maximized state are then opened as small as possible
Summary: Applications closed in maximized state are then opened as small as possible
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.6
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-14 15:06 UTC by Sergio
Modified: 2022-09-17 07:51 UTC (History)
3 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 Sergio 2022-09-14 15:06:03 UTC
SUMMARY

The issue is quite visible with libreoffice, but also happens with other applications.

If you open a libreoffice application (say calc), then maximize it, then close it, when you open the same application again the application window is made as small as possible. For libreoffice, this means an almost invisible window. You need to go to the application in the taskbar, right click, click "more" and from there resize or maximize again the window to make it visible.

Conversely, if you open a libreoffice app (again, say calc), then resize it to some size (not the maximum one!), close the application and launch it again, then the window is reopened at the same size it had when it was closed, that seems totally reasonable.

STEPS TO REPRODUCE

Follow the instructions in the summary.

OBSERVED RESULT

In many cases, application windows are opened at the smallest possible size, that is often so small that you cannot even see the window. This is quite confusing to inexperienced users and hinders usability.

EXPECTED RESULT

All applications should open at reasonable window sizes, typically as they were closed.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-47-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 15,3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 1 Nate Graham 2022-09-14 19:46:15 UTC
Cannot reproduce with current git master in either the X11 or Wayland session. When I re-open Calc, it gets re-opened in the maximized state, just like I would expect.
Comment 2 Vlad Zahorodnii 2022-09-15 07:33:24 UTC
What decoration border setting do you use? Can you try "no borders"?
Comment 3 Sergio 2022-09-15 11:55:35 UTC
Weird, seems to happen with Libreoffice 7.4 but not with 7.3.x... but how can this be a bug in the application?
Comment 4 Vlad Zahorodnii 2022-09-15 12:36:28 UTC
Can't reproduce neither with kwin from git master nor 5.24. What decoration theme do you use? Also, do you have any window rules?
Comment 5 Sergio 2022-09-15 13:53:54 UTC
I have never touched this: how do you change the decoration border settings?

For what concerns the window rules:

- I have one assuring that firefox and thunderbird always open in virtual desktop 4;
- I used to have nothing else, but now I am setting a minimum size for LibO, to avoid getting windows that are so small that they are invisible in the top left corner.

Any clue about the fact that I see this issue with LibO 7.3 but not LibO 7.4?
Comment 6 Nate Graham 2022-09-15 13:55:35 UTC
It's actually quite possible as KWin respects the size that an app says it wants its window to open with. So it seems like that may have changed between 7.3 and 7.4.
Comment 7 Vlad Zahorodnii 2022-09-15 13:57:16 UTC
Can you share your ~/.config/kwinrulesrc file?
Comment 8 Nate Graham 2022-09-16 15:11:01 UTC
.
Comment 9 Sergio 2022-09-16 15:47:14 UTC
Here is the file:

[$Version]
update_info=kwinrules.upd:replace-placement-string-to-enum,kwinrules.upd:use-virtual-desktop-ids

[1]
Description=Application settings for libreoffice-calc
clientmachine=localhost
clientmachinematch=0
desktop=4
desktoprule=3
desktops=1975fa63-fe75-4993-9881-a378c12b056c
minsize=800,600
minsizerule=2
wmclass=libreoffice libreoffice-calc
wmclasscomplete=true
wmclassmatch=1

[2]
Description=Application settings for libreoffice-startcenter
clientmachine=localhost
clientmachinematch=0
desktop=4
desktoprule=3
desktops=1975fa63-fe75-4993-9881-a378c12b056c
minsize=800,600
minsizerule=2
wmclass=libreoffice libreoffice-startcenter
wmclasscomplete=true
wmclassmatch=1

[3]
Description=Application settings for thunderbird
clientmachine=localhost
desktops=1975fa63-fe75-4993-9881-a378c12b056c
desktopsrule=2
wmclass=mail thunderbird
wmclasscomplete=true
wmclassmatch=1

[319f7847-e3a0-4190-a1ad-d705a3a025d9]
Description=Application settings for libreoffice-startcenter
clientmachine=localhost
minsize=800,600
minsizerule=2
wmclass=libreoffice libreoffice-startcenter
wmclasscomplete=true
wmclassmatch=1

[384731b6-981a-4110-8dae-c2bbf8e1aa65]
Description=Application settings for libreoffice-calc
clientmachine=localhost
minsize=800,600
minsizerule=2
wmclass=libreoffice libreoffice-calc
wmclasscomplete=true
wmclassmatch=1

[4]
Description=Application settings for firefox
clientmachine=localhost
desktops=1975fa63-fe75-4993-9881-a378c12b056c
desktopsrule=2
wmclass=navigator firefox
wmclasscomplete=true
wmclassmatch=1

[5ebfc235-f760-45f2-ae41-0c9b79f3ef5c]
Description=Application settings for thunderbird
clientmachine=localhost
desktops=1975fa63-fe75-4993-9881-a378c12b056c
desktopsrule=2
wmclass=mail thunderbird
wmclasscomplete=true
wmclassmatch=1

[83c87e6b-35b3-4ff5-b5f7-9ca7529e8b3f]
Description=Application settings for firefox
clientmachine=localhost
desktops=1975fa63-fe75-4993-9881-a378c12b056c
desktopsrule=2
wmclass=navigator firefox
wmclasscomplete=true
wmclassmatch=1

[General]
count=4
rules=1,2,3,4
Comment 10 Rafael Lima 2022-09-16 19:40:58 UTC
I am having the exact same issue with LibreOffice windows. If I maximize them, the next time I open the application they appear with minimal size at the top-left corner of my screen.

However, if I resize the window manually (without maximizing it), the window size is remembered correctly if I close and reopen the application.

I am not using any window rules and my system theme is Breeze Dark without any modifications to window decorations.

A bug report has also been opened in LibreOffice's bugzilla:
https://bugs.documentfoundation.org/show_bug.cgi?id=151004

System info:

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-47-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 15,6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1660/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B450M DS3H
Comment 11 Michael Weghorn 2022-09-17 07:51:28 UTC
This is a LibreOffice bug, fixed in LibreOffice 7.4.2, s. https://bugs.documentfoundation.org/show_bug.cgi?id=150856