Bug 387097

Summary: Need ability to read client.maximizeMode since it's currently not a property
Product: [Plasma] kwin Reporter: Chris Holland <zrenfire>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: bugs.kde.org, espidev, lorenzus.ian8, mariusz.libera, megabigbug, natalie_clarius, tom
Priority: NOR    
Version First Reported In: 5.25.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Chris Holland 2017-11-19 06:40:00 UTC
I need to know if the client is maximized during workspace.clientAdded for my script. New Firefox windows can start maximized, which means my script isn't able to hide the titlebar until the user un-maximizes then maximizes (triggering client.clientMaximizedStateChanged).
Comment 1 Lionel Chauvin 2018-03-12 20:01:12 UTC
(In reply to Chris Holland from comment #0)
> I need to know if the client is maximized during workspace.clientAdded for
> my script. New Firefox windows can start maximized, which means my script
> isn't able to hide the titlebar until the user un-maximizes then maximizes
> (triggering client.clientMaximizedStateChanged).

Hi,

client.minimized is exposed but not client.maximized :D

As a workaround, did you try to check if the geometry is equal to the WorkArea ?
Comment 2 Martin Flöser 2018-03-24 19:31:20 UTC
*** Bug 392279 has been marked as a duplicate of this bug. ***
Comment 3 Piotr Dobrogost 2025-07-03 07:44:01 UTC
At matrix channel #plasma-dev:kde.org Devin Lin made a remark that it's already exposed and pointed to https://invent.kde.org/plasma/kwin/-/blob/master/src/window.h#L483

     * Whether the window is maximized horizontally, vertically or fully.
     * This is read only, in order to maximize from a script use
     * the setMaximize function
     * @see setMaximize
     */
    Q_PROPERTY(KWin::MaximizeMode maximizeMode READ maximizeMode NOTIFY maximizedChanged)

It looks like this issue is resolved and can be closed.
Comment 4 Piotr Dobrogost 2025-07-03 20:11:15 UTC
It seems this property is not documented at https://develop.kde.org/docs/plasma/kwin/api/