Bug 454827 - Minimum window size rule cannot override the enforced minimum size
Summary: Minimum window size rule cannot override the enforced minimum size
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (other bugs)
Version First Reported In: 5.24.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2022-06-04 11:04 UTC by Fabio Lenherr
Modified: 2026-01-21 04:59 UTC (History)
8 users (show)

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


Attachments
Bug displayed with systemsettings (227.79 KB, image/png)
2022-06-04 11:04 UTC, Fabio Lenherr
Details
example how it should work (267.19 KB, image/png)
2022-06-04 11:05 UTC, Fabio Lenherr
Details
minimum size set to 0,0 for both but minimum size still differs (352.25 KB, image/png)
2026-01-21 04:40 UTC, 0byte
Details
minimum size for handbrake flatpak version is not being applied (166.37 KB, image/png)
2026-01-21 04:41 UTC, 0byte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Lenherr 2022-06-04 11:04:40 UTC
Created attachment 149446 [details]
Bug displayed with systemsettings

SUMMARY
***
On Wayland, plasma ignores the minimum window size rule. 
In other words, manually redefining the minimum size is not possible, or rather it doesn't work.
On X11 it works as intended.

example attached.

***


STEPS TO REPRODUCE
1. Start plasma with wayland
2. set a minimum window size rule for systemsettings -> example 0 width 0 height
(systemsettings used as example, works for every application with a fixed minimum size.)
3. try to resize smaller to than the default minimum size

OBSERVED RESULT

Window doesn't resize smaller than the default minimum size

EXPECTED RESULT

Window resizes to set minimum size via rule.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch / KDE
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Comment 1 Fabio Lenherr 2022-06-04 11:05:31 UTC
Created attachment 149447 [details]
example how it should work
Comment 2 Paul Worrall 2022-06-05 08:58:03 UTC
Confirming.  Note that minimum window size works OK on Wayland for applications with no pre-programmed minimum size.
Comment 3 Nate Graham 2022-06-06 19:21:59 UTC
Probably Bug 434615 has the same root cause.
Comment 4 Daniel Petrov 2025-05-14 16:26:21 UTC
I have a weird problem, but idk if this is the cause.

I am making a keyboard visualizer. When passing all env vars through pkexec or through sudo -E, it enforces a minimum height of 150px. however, when I run plain sudo, it has no restrictions whatsoever, but also doesn't follow of my Qt settings, probably because it is the root user.
Comment 5 0byte 2026-01-14 19:50:07 UTC
Very annoying. Software like handbrake has for me roughly a mininum size or 960x600 which is still quite large and is unusable with krohnkite tiler.
Comment 6 Ismael Asensio 2026-01-20 20:28:41 UTC
I cannot reproduce it with the set example on System Settings on latest master.

The new minimum size I force into the rule is respected and lets me resize the window below the default window size of the app until the one set by the rule. 

This seems like and old bug report (targets 5.24). Is this still an issue on a more recent Plasma version?
If so, data about system/versions would be useful (output of `kinfo`)
Comment 7 Alex Folland 2026-01-20 20:56:46 UTC
I can reproduce it with Slack in KWin-Wayland 6.5.5.  If I set "minimum size" to 32 pixels by 32 pixels and "force", and also set "obey geometry restrictions" to "false" and "force", I get a bit of a better resizing range, but it stops at 347 pixels by 200 pixels, which is an arbitrary minimum size that's way higher than 32 pixels by 32 pixels.  I am still not in full control of my window management.
Comment 8 Alex Folland 2026-01-20 20:59:34 UTC
Output of kinfo as requested (sorry, missed that part in my previous comment):

❯ kinfo
Operating System: CachyOS Linux 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.18.6-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 9950X3D 16-Core Processor
Memory: 128 GiB of RAM (123.5 GiB usable)
Graphics Processor 1: AMD Radeon RX 7900 XT
Graphics Processor 2: AMD Ryzen 9 9950X3D 16-Core Processor
Comment 9 Ismael Asensio 2026-01-20 22:58:40 UTC
(In reply to Alex Folland from comment #7)
> I can reproduce it with Slack in KWin-Wayland 6.5.5.  If I set "minimum
> size" to 32 pixels by 32 pixels and "force", and also set "obey geometry
> restrictions" to "false" and "force", I get a bit of a better resizing
> range, but it stops at 347 pixels by 200 pixels, which is an arbitrary
> minimum size that's way higher than 32 pixels by 32 pixels.  I am still not
> in full control of my window management.

Thanks for the info and your input!

I think this is a slightly different issue than the original bug report, which could be considered fixed by now as rules actually override the app's established minimum size.

KWin however, imposes another strict minimum size (generally 150x150px + decorations) to every desktop window. This is to avoid some issues with certain apps that doesn't set a min size on their own and can become unusable. I'm not totally sure though, why the numbers are a bit larger for you (347x200)

So this behavior is kind of intentional right now. It can be argued that the minimum size set by window rules should also override this internal enforced size, as they are explicitly set by the user (and usually one with some technical knowledge)
Comment 10 Alex Folland 2026-01-21 00:45:11 UTC
Yes, I would personally prefer if the window manager obeyed the settings I set, with no hard-coded restrictions.  There are many tools for managing windows, so the user doesn't need to be saved from themselves.

Thanks for the info.  I agree that the Slack minimum window size is unexpected.  FYI, I checked the size after shrinking the window using the "detect window properties" feature.
Comment 11 0byte 2026-01-21 04:40:28 UTC
Created attachment 188736 [details]
minimum size set to 0,0 for both but minimum size still differs
Comment 12 0byte 2026-01-21 04:41:06 UTC
Created attachment 188737 [details]
minimum size for handbrake flatpak version is not being applied
Comment 13 0byte 2026-01-21 04:59:54 UTC
I tested this on KDE Plasma 6.4.80

Both attachments show the minimum size set to 0,0, but the effective minimum size still differs attachment 188736 [details]

For HandBrake (Flatpak) the minimum size setting does not seem to be applied at all attachment 188737 [details]

Another application where the minimum size also does not work is CMake

I would prefer 0,0 to actually mean 0,0 allowing the window to scale past decorations and other restrictions. Maybe this could be exposed via a toggle?