Bug 423214 - Changes configured in 'Special Application Settings', 'Special Window Settings' don't appear to work or persist
Summary: Changes configured in 'Special Application Settings', 'Special Window Setting...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.19.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Ismael Asensio
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-06-19 10:39 UTC by Guruprasad
Modified: 2020-06-25 15:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guruprasad 2020-06-19 10:39:05 UTC
SUMMARY
When special application/window settings are configured from the drop down menu that shows up when clicking the application icon in the title bar, they don't appear to get saved or applied.

STEPS TO REPRODUCE
1. Click on the application icon in the title bar.
2. Select 'More Actions -> Special Window settings' or 'More Actions -> Special application settings'.
3. Add a new property, and configure it say to force the desktop file of an application.
4. Click the OK button.
5. Repeat the steps 1, 2.

OBSERVED RESULT
The configured property doesn't show up and doesn't work. I can provide a GIF recording of this issue if needed.

Run 'kcmshell5 kcm_kwinrules' from the command line. The added property overrides are listed in the application window that shows up and this indicates that the property overrides have been saved. They just don't show up in the window launched from the application icon menu.

Though the overrides show up in the second case, they don't get applied and the overrides don't work.

EXPECTED RESULT
The configured property overrides show up and work.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux running the 5.7.3 Linux kernel
KDE Plasma Version: 5.19.1
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION

I have a separate .desktop file for a custom Firefox profile with a custom icon created using kmenuedit and saved under ~/.local/share/applications. I have also added a configured a distinct window class using the StartupWMClass and used the same class name in the command to launch Firefox. The icon in the panel task manager reflects the customizations. But the application icon in the title bar and the alt-tab switcher still show the vanilla Firefox icon. 

This works fine on the older Plasma 5.18.5 (KDE Frameworks Version: 5.70.0, Qt version: 5.15.0) on Manjaro Linux, which has the older version of the configuration window in question.

This could be a separate, but related issue.
Comment 1 Guruprasad 2020-06-19 11:06:50 UTC
> But the application icon in the title bar and the alt-tab switcher still show the vanilla Firefox icon. 

This happens even after adding a property override which doesn't show up in the Kwin settings window as reported in this bug but shows up in the window launched by "kcmshell5 kcm_kwinrules".
Comment 3 Nate Graham 2020-06-25 15:46:02 UTC
Git commit 8b9472e0bfcff8cb7467ee3055282a133a808349 by Nate Graham, on behalf of Ismael Asensio.
Committed on 25/06/2020 at 15:44.
Pushed by ngraham into branch 'Plasma/5.19'.

[kcm/kwinrules] Fix types property for NET::AllTypesMask

When the user selects all of the types or none of them, the "types"
property must be set to a special value (`NET::AllTypesMask = -1`),
different than the sum of all the flags together.

This re-implements this behaviour as the old KCM, fixing some heuristics
that prevented finding the rule corresponding to the current window.

The enum name that handles this property has been changed to `NetTypes`
to make it more explicit.
FIXED-IN: 5.19.3

TEST PLAN:
1. Open the `Application specific settings` on a window via menu
2. Select every "Window Type" (or none of them)
3. Give the rule a different name than the default and save
4. Open it again and check that the same rule is found

M  +1    -1    kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
M  +4    -3    kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml
M  +6    -5    kcmkwin/kwinrules/ruleitem.cpp
M  +1    -1    kcmkwin/kwinrules/ruleitem.h
M  +2    -2    kcmkwin/kwinrules/rulesmodel.cpp

https://invent.kde.org/plasma/kwin/commit/8b9472e0bfcff8cb7467ee3055282a133a808349