Bug 476958 - Task switcher style is not reset after clicking on "Defaults" button
Summary: Task switcher style is not reset after clicking on "Defaults" button
Status: RESOLVED DUPLICATE of bug 474957
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwintabbox (other bugs)
Version First Reported In: 5.27.80
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-13 19:00 UTC by Patrick Silva
Modified: 2024-01-10 20:23 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-11-13 19:00:36 UTC
STEPS TO REPRODUCE
1. open Task Switcher KCM
2. set Large Icons task switcher and non-default keyboard shortcuts - the changes are detected as non-default settings in orange, as expected
3. click on "Defaults" button

OBSERVED RESULT
the task switcher is not reverted to the default one

EXPECTED RESULT
all settings in Task Switcher KCM should be reverted to the default values

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-11-14 23:11:41 UTC
Can reproduce. Other settings do get reset, though.
Comment 2 Ismael Asensio 2024-01-09 00:15:01 UTC
The problem is that the default value we get when consulting KWin::TabBox is "org.kde.breeze.desktop", while the plugin name is  "thumbnail_grid", so the value in the combo doesn't match.

It doesn't happen though for the Alternative tabbox (both share the UI and the settings code in the KCM). This makes me thing that is the LookAndFeel package which modifies this default value via cascading options.

When pressing the "Defaults" button:
KWinTabBoxConfigForm::updateUiFromConfig() "org.kde.breeze.desktop"    // Main
KWinTabBoxConfigForm::updateUiFromConfig() "thumbnail_grid"                   // Alternative

Will need some more debug to pinpoint where to fix it (it is a bit of a rabbit hole). Or maybe we just manually add an exception for this specific string here, but I would prefer something less fragile.
Comment 3 Ismael Asensio 2024-01-09 22:24:12 UTC
I can confirm that the issue is un-cleaned configuration entries still present in `~/.config/kdedefaults/kwinrc` and removing it fixes this issue.

There's a whole group [TabBox] that it's not necessary anymore there:
[TabBox]
DesktopLayout=org.kde.breeze.desktop   // Not used anymore
DesktopListLayout=org.kde.breeze.desktop   // Not used anymore
LayoutName=org.kde.breeze.desktop   // Cause of this bug. Not used by breeze themes but might be by others.

Since https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2910 we no longer include the tabbox config default in the breeze look-and-feel themes (but directly in kwin), so luckily new users of Plasma 6 will not reproduce the bug.

However, we should remove the obsolete config entries for users updating from Plasma 5.  
We can make a kconfupdate script just for this.

Something like https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3345 looks like the definitive and more general solution.
Comment 4 Nate Graham 2024-01-10 20:23:11 UTC
Indeed, I agree.

*** This bug has been marked as a duplicate of bug 474957 ***