File 0002-tabbox-Correctly-set-global-short-on-kwin-tabbox.patch of Package kwin5

From 51ef0ebf6283459fa9b6596f25ee1e4fa40f9f05 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Tue, 15 Oct 2019 12:39:57 +0100
Subject: [PATCH 2/2] [tabbox] Correctly set global short on kwin tabbox

Summary:
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
forever.

BUG: 407000

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

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24647
---
 tabbox/tabbox.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp
index 42651c6be..475e57e31 100644
--- a/tabbox/tabbox.cpp
+++ b/tabbox/tabbox.cpp
@@ -526,7 +526,7 @@ void TabBox::key(const char *actionName, Slot slot, const QKeySequence &shortcut
     a->setProperty("componentName", QStringLiteral(KWIN_NAME));
     a->setObjectName(QString::fromUtf8(actionName));
     a->setText(i18n(actionName));
-    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());
-- 
2.22.0

openSUSE Build Service is sponsored by