Summary: | Special Window Settings are written with lowercased WM_WINDOW_ROLE | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Tristan Miller <psychonaut> |
Component: | rules | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Flags: | mgraesslin:
ReviewRequest+
|
Priority: | NOR | ||
Version First Reported In: | 5.5.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
URL: | https://phabricator.kde.org/D2574 | ||
Latest Commit: | http://commits.kde.org/kwin/97b594501a439f4e5ee5f4237f253fb84087c423 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Output of xprop on the KPatience window |
Description
Tristan Miller
2016-08-19 10:02:44 UTC
can you please upload a rule which does not work? Sure, here's the "Apply Initially" variant of the rule mentioned in my original report: [Window settings for kpat] Description=Window settings for kpat clientmachine=localhost clientmachinematch=0 maximizevert=true maximizevertrule=3 title=KPatience titlematch=0 types=1 windowrole=mainwindow windowrolematch=1 wmclass=kpat wmclasscomplete=false wmclassmatch=1 Smells related to bug #343709 - "mainwindow" is probably really "MainWindow" or similar. Please attach the ouput of "xprop" on a window you want to control this way. Created attachment 100696 [details]
Output of xprop on the KPatience window
As requested, attached is the output of xprop on the KPatience window used in my previous comments.
> WM_WINDOW_ROLE(STRING) = "MainWindow"
Bingo. The rule needs to be written case sesitively.
Wasn't this supposed to be fixed with Bug 343709? No. The role was originally handled lowercased in kwin. This was implicitly changed by no more keeping the value internally but relying on the kwindowsystem value. As a result, the rule now matches case sensitively. All fine, but the rule is still *written* lowercased (at least in this context) @Tristan: can you try to change the windowrole to MainWindow in the rule config? Yes, the settings are applied correctly if I change the capitalization to MainWindow. awesome, so that seems to work then. Why WORKSFORME? Surely manually changing every rule isn't an acceptable workaround. Or are you saying that the fix to Bug 343709 fixes this issue after all? sorry, you are right. Existing rules should also be supported. Git commit 6e8a8913d1b4d6a95a2c2b74612d57ba1cce37c7 by Martin Gräßlin. Committed on 25/08/2016 at 11:23. Pushed by graesslin into branch 'master'. [autotests/integration] Add test case for rule matching on window role New test infrastructure which supports testing window rules at runtime. Test exposes problem of window rules not able to match window roles in a case insensitive manner. M +1 -0 autotests/integration/CMakeLists.txt A +13 -0 autotests/integration/data/rules/maximize-vert-apply-initial A +172 -0 autotests/integration/window_rules_test.cpp [License: GPL (v2)] M +1 -1 rules.h http://commits.kde.org/kwin/6e8a8913d1b4d6a95a2c2b74612d57ba1cce37c7 Possible fix at https://phabricator.kde.org/D2574 Git commit 97b594501a439f4e5ee5f4237f253fb84087c423 by Martin Gräßlin. Committed on 13/09/2016 at 06:37. Pushed by graesslin into branch 'master'. Match window role in Rules in a case insensitive manner Summary: We used to have a toLower when reading the rule. This was removed with 4f7edb8 which turned it into a case sensitive matching to fix a regression. But this created another regression: existing rules written lower case are no longer matched. This change makes the role matching case insensitive again. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D2574 M +0 -1 autotests/integration/window_rules_test.cpp M +2 -2 rules.cpp http://commits.kde.org/kwin/97b594501a439f4e5ee5f4237f253fb84087c423 |