[kcm/kwinrules] Fix Placement setting
ClosedPublic

Authored by iasensio on May 16 2020, 12:29 AM.

Details

Summary

Since the port to KConfigXT, the setting "placement" is stored using the enum value, instead of a string equivalent.
This updates the kcm model to be able to communicate this property with the config schema.

BUG: 421586
FIXED-IN: 5.19.0

Test Plan
  • In a rule set the "Initial Placement" property
  • The value is stored in ~/.config/kwinrulesrc
  • Close/reopen the kcm. The placement value is correctly loaded.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
iasensio created this revision.May 16 2020, 12:29 AM
Restricted Application added a project: KWin. · View Herald TranscriptMay 16 2020, 12:29 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
iasensio requested review of this revision.May 16 2020, 12:29 AM
zzag added a subscriber: zzag.May 16 2020, 8:52 AM

The setting "placement" is now stored usign the enum value, instead of a string equivalent

This will break the placement window rule for existing users, won't it? We either need a kconf_update script to replace strings with enum values or just continue using strings.

iasensio added a comment.EditedMay 16 2020, 11:52 AM

Sorry, I phrased it wrong. The change to use the enum instead of strings in the settigs was done before the new kcm, in the port to KconfigXT. This just updates the kcm to it since it's not working (it can not read/write the placement from the settings schema)

EDIT: For what I've gather, the kconf_update script would still be required to update previous configs, independently of this patch, since the change is also new to 5.19.

iasensio edited the summary of this revision. (Show Details)May 16 2020, 12:39 PM
zzag accepted this revision.May 18 2020, 8:20 AM

Okay, I see. We still probably need a kconf_update script, but it would be unrelated to what this change intends to do.

This revision is now accepted and ready to land.May 18 2020, 8:20 AM
This revision was automatically updated to reflect the committed changes.