Bug 442215 - Shortcut window rule not fully restored after crash
Summary: Shortcut window rule not fully restored after crash
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.22.5
Platform: Other Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KWin default assignee
Depends on:
Reported: 2021-09-09 10:26 UTC by Dominik Kummer
Modified: 2021-09-10 11:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22.80

kwin_x11 crash coredump (217.24 KB, text/plain)
2021-09-09 10:26 UTC, Dominik Kummer

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Kummer 2021-09-09 10:26:04 UTC
Created attachment 141419 [details]
kwin_x11 crash coredump

After a kwin crash and auto-restart of plasmashell the window rules are not restored. Window rules have to be changed and re-applied through settings to be party restored. The shortcut-access rules are not restorable. As a result advanced workflows through window rules are not usable anymore.

1. produce a kwin crash
2. retry keyboard shortcut defined in window rules
3. re-apply window rule settings (now rules party in effect; shortcuts still not working)

Keyboard shortcut for window access/focus not working anymore

All window rules restored into effect after plasmashell restart.

plasmashell 5.22.5
Comment 1 Ismael Asensio 2021-09-09 13:40:35 UTC
I cannot fully reproduce this. After crashing kwin (kill -SEGV), it is auto-restored and most rule settings re-applied (for instance, the virtual desktop rule or color scheme).

It's difficult to assure which of them are restored or not because they are checked and applied individually. 

The shortcuts rule though is not restored just as you describe.

Which ones did you notice that are also not restored?
Comment 2 Bug Janitor Service 2021-09-09 16:06:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1401
Comment 3 Dominik Kummer 2021-09-10 10:08:51 UTC
Right, the shortcut rule is my main observation. Also I belief that I noticed different positioning from my primary towards my secondary display. But the main issue is about the window shortcut access rule.
Comment 4 Ismael Asensio 2021-09-10 11:03:58 UTC
Git commit 07551a4487fb01dc2fd6481947f05c6546d9e743 by Ismael Asensio.
Committed on 10/09/2021 at 11:00.
Pushed by iasensio into branch 'master'.

Workspace: Better check of registered client shortcuts

Do not discard a shortcut immediately when it is already registered
in KGlobalAccel, because there could be possible dangling shortcuts
if they weren't properly cleaned-up (ex. after a crash).

Instead we delay the check for conflicts with other client shortcuts
to the second loop, which we know is up to date.
FIXED-IN: 5.22.80

M  +11   -6    src/useractions.cpp