Commit 5d4be83d authored by David Edmundson's avatar David Edmundson
Browse files

[tabbox] Correctly set global short on kwin tabbox

We need to set both the current autoload shortcut and the default
shortcut. setGlobalShortcut is a convenience method for both.

Otherwise clicking defaults in the keys KCM will discard the shortcut

BUG: 407000

Test Plan:
wiped kglobalshortcutsrc to get a clean slate
restarted kwin
hit defauts in the kwin KCM
could still alt+tab

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent b7ea14d3
......@@ -526,7 +526,7 @@ void TabBox::key(const char *actionName, Slot slot, const QKeySequence &shortcut
a->setProperty("componentName", QStringLiteral(KWIN_NAME));
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << shortcut);
KGlobalAccel::self()->setGlobalShortcut(a, QList<QKeySequence>() << shortcut);
input()->registerShortcut(shortcut, a, TabBox::self(), slot);
auto cuts = KGlobalAccel::self()->shortcut(a);
globalShortcutChanged(a, cuts.isEmpty() ? QKeySequence() : cuts.first());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment