Window objects in KWin JS scripts should have a "maximized" property to indicate if the window is maximized. Or at least "maximized_horizontal" and "maximized_vertical". They have "minimized", "fullScreen" and "maximizable", but no "maximized". I'm not sure if this is just an oversight or a bug. There are also two signals documented, "maximizedAboutToChange(MaximizeMode mode)" and "maximizedChanged()", but they appear to not work at all. No signals are received from them when changing the maximized state of a window. There doesn't appear to be any way currently to tell if a window is maximized in KWin JS scripts.
There's a `maximizeMode` property, perhaps the documentation doesn't reflect it
(In reply to Vlad Zahorodnii from comment #1) > There's a `maximizeMode` property, perhaps the documentation doesn't reflect it Are you certain? `window.maximizeMode` is undefined for me.
Hmm, that's odd... https://invent.kde.org/plasma/kwin/-/commit/6c345acb009ae940397c4b39e6a46564f50a2029
(In reply to Vlad Zahorodnii from comment #3) > Hmm, that's odd... > https://invent.kde.org/plasma/kwin/-/commit/6c345acb009ae940397c4b39e6a46564f50a2029 Well this just shows you the importance of selecting the correct version on your bug report. I was still on KDE 6.2.4. After updating to 6.3.1 it works! Thanks for the help. Documentation would be great, but that's another issue.