Bug 464366

Summary: Limit minimum window size by default
Product: [Plasma] kwin Reporter: Yevhen Popok <xalt7x.service>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Demonstation of the issue with KWin

Description Yevhen Popok 2023-01-16 07:35:08 UTC
Created attachment 155344 [details]
Demonstation of the issue with KWin

SUMMARY
Some programs don't limit size of it's windows so user could accidentally resize them to unusable state.
Primary example is LibreOffice ([bugreport](https://bugs.documentfoundation.org/show_bug.cgi?id=151870) at LibreOffice bugtracker)
Issue is reproducible on both X11 and Wayland sessions. I've also tried other desktop environments. On GNOME X11 it's more or less the same but with GNOME Wayland or Windows 10 minimum size is limited to a headerbar height.
KWin rule is a very nice and simple workaround for this issue but still would be great to have some safe defaults.

STEPS TO REPRODUCE
1. Launch LibreOffice Calc
2. Drag diagonally by some corner

OBSERVED RESULT
Window resized to tiny size so I'm enable to close it with a left click. I have to use context menu (Alt+F3, right click on taskbar) Meta+RMB resize.

EXPECTED RESULT
Some sensible minimum size limit so user could easily use window controls, drag window, resize it back etc

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Version doesn't really matter as it's also reproducible on the latest KDE Neon (5.26.80)
Comment 1 Vlad Zahorodnii 2023-01-16 10:45:13 UTC
Libreoffice doesn't set reasonable minimum size

[ 891583.742]  -> xdg_toplevel@37.set_min_size(0, 29)

Please report this issue to libreoffice developers.
Comment 2 Yevhen Popok 2023-01-16 12:27:17 UTC
(In reply to Vlad Zahorodnii from comment #1)
> Libreoffice doesn't set reasonable minimum size
> 
> [ 891583.742]  -> xdg_toplevel@37.set_min_size(0, 29)
> 
> Please report this issue to libreoffice developers.

It's reported already (https://bugs.documentfoundation.org/show_bug.cgi?id=151870)
I don't know what to add to that bugreport.
Comment 3 Yevhen Popok 2023-01-16 12:44:34 UTC
(In reply to Vlad Zahorodnii from comment #1)
Anyway, thanks for looking at it.