No, I don’t think that I misunderstood you.
Your main problem is that some windows are too big to fit onto the screen.
But the title of this thread is “prevent windows going below task manager” (I suppose you mean the panel), so I tried to cover that as well.
This is a new behaviour that I did not see in earlier releases of plasma 5.
The “Energy settings” window you show is a known “bug” in kcmshell5. It apparently sizes the window big enough to not show scroll bars and doesn’t regard the screen size.
See 1001272 – KDE "Energy Saving" dialog is not resizable and OK/Apply/Cancel buttons off (laptop) screen and 366299 – System setting "Energy Saving" window is too large for a standard laptop screen.
I don’t think this is a new problem, but newer Plasma (powerdevil5) versions may offer more settings on your system, so the window will get bigger.
It doesn’t happen here btw, mine is about 670 pixels high; but again, it depends on your system what options are available and as a consequence how high the window will be.
Another “workaround” for this particular case would be to open those settings in systemsettings5, this will not enlarge the window but rather show scroll bars instead.
If I select “more actions > keep above” then the power management window is then above the task manager but the ok/apply/cancel buttons are still off screen.
Yes, the problem is that the buttons are off screen (because the window is too big to fit to the screen and kwin tries to keep the window title bar on screen at least), not that they are below the panel.
Indeed I can move the window around and can even adjust the window width but it will not let me adjust the window height no matter what is tried.
I thought it should be able to resize it via the methods I mentioned.
But I tried just now, and it’s really not possible to make it smaller.
Sorry, I seemed to remember I could shrink it when I last tried. But apparently my memory played tricks with me…
Apparently the application (kcmshell5) indeed sets the minimum size bigger (i.e. higher) than the screen in your case (for this particular settings module).
The only windows I can reproduce this strange behaviour on are the power management window in plasma, Handbrake-gtk and MKVToolNix GUI
That’s a bug in those applications then though, kwin just respects what the applications set the window’s (minimum) size to.
Actually this is/was quite a common problem in GTK applications, I do remember a few bug reports.
One way to “fix” the problem for the affected applications may be via kwin’s “window rules” (“More Actions”->“Special Settings for this window”).
You can force a specific size (and also minimum and maximum size) that way.
I haven’t actually tried this now, but this really should work.