Bug 271856

Summary: Add WM_STATE match in kwin rules
Product: [Plasma] kwin Reporter: Gokdeniz Karadag <gokdenizk>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: natalie_clarius, xaver.hugl
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gokdeniz Karadag 2011-04-27 17:51:55 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

Kwin rules do not seem to support matching a window's state(WM_STATE). It would be benefical if kwin rules had the ability to match a "maximized" window, in addition to other window states.

----use case---
I want to remove titlebar in maximized firefox windows, as it is more "stylish", and more importantly, it's space efficient. I can match the firefox windows in a kwin rule but I cannot match the maximized state. A general rule removes the titlebar & borders in smaller/popup window.
---------------
 
I checked the source for possible hidden options but could not find matching the WM_STATE.

xprop on a maximized window gives:
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
on a normal window, it's empty.
_NET_WM_STATE(ATOM) = 


Reproducible: Always
Comment 1 Martin Flöser 2011-04-27 19:32:32 UTC
For your usecase there is the scripting API which would support that. Adding 
tracking maximized state with the window rules is not trivial and would 
probably not been added.
Comment 2 Thomas Lübking 2011-04-28 13:19:27 UTC
@Gokdeniz
You're aware that FF has a built-in fullscreen feature that (you want to use? and) also will allow you to end this state from the FF menu or the figured shortcut (where you'd need to know about alt+f3 or have a decoration toggle shortcut with your attempt)

If you wish to hide the menubar for /all/ maximized clients, this is possible through an undocumented feature of kwin:
kwriteconfig --file kwinrc --group Windows --key BorderlessMaximizedWindows true
qdbus org.kde.kwin /KWin reconfigure
Comment 3 Gokdeniz Karadag 2011-04-28 16:49:21 UTC
(In reply to comment #2)
> @Gokdeniz
> You're aware that FF has a built-in fullscreen feature that (you want to use?
> and) also will allow you to end this state from the FF menu or the figured
> shortcut (where you'd need to know about alt+f3 or have a decoration toggle
> shortcut with your attempt)

One difference; the fullscreen option of Firefox hides the tab bar and other toolbars.

> If you wish to hide the menubar for /all/ maximized clients, this is possible
> through an undocumented feature of kwin:
> kwriteconfig --file kwinrc --group Windows --key BorderlessMaximizedWindows
> true
> qdbus org.kde.kwin /KWin reconfigure

I have become aware of this undocumented setting while looking for a solution to my use case.

While I have not looked into Kwin scripting API yet, filtering windows by window state seemes like a good idea.

In compiz, one can enter filters like this
any & !(class=Firefox & state=maxvert & role=browser)
source:
http://www.webupd8.org/2011/03/firefox-4-get-tabs-in-title-bar-like.html
Comment 4 Zamundaaa 2024-09-20 13:28:04 UTC
Removing the decorations of maximized windows has been a feature in KWin for a while, closing this