Bug 432137

Summary: Generated window class match doesn't match if it contains trailing whitespaces
Product: [Plasma] kwin Reporter: Fabian Vogt <fabian>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: isma.af, nate, postix
Priority: NOR    
Version: 5.20.90   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Fabian Vogt 2021-01-26 08:21:44 UTC
When trying to create a window rule for YaST, the prefilled generated conditions don't match.

Changing the window class match from "Exact match" to "Match substring" makes it work.

I believe this is because there are trailing spaces in WM_CLASS and WM_NAME for some reason:

WM_NAME(STRING) = "YaST2 - partitioner @ localhost.localdomain                                     "
_NET_WM_NAME(UTF8_STRING) = "YaST2 - partitioner @ localhost.localdomain                                     "
WM_CLASS(STRING) = "YaST2", "YaST2 - partitioner @ localhost.localdomain                                     "

Originally reported downstream as https://bugzilla.opensuse.org/show_bug.cgi?id=1181316.
Comment 1 David Edmundson 2023-09-06 10:38:48 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.