fix shortcut available check

and bypass idempotent shortcut setting

BUG: 327472
FIXED-IN: 4.11.4
REVIEW: 113807
icc-effect-5.14.5
Thomas Lübking 2013-11-12 00:20:38 +01:00
parent 6e56dcd60a
commit 54a4a4547d
1 changed files with 5 additions and 1 deletions

View File

@ -1919,6 +1919,9 @@ void Client::setShortcut(const QString& _cut)
QString cut = rules()->checkShortcut(_cut);
if (cut.isEmpty())
return setShortcutInternal(KShortcut());
if (cut == shortcut().toString()) {
return; // no change
}
// Format:
// base+(abcdef)<space>base+(abcdef)
// E.g. Alt+Ctrl+(ABCDEF);Meta+X,Meta+(ABCDEF)
@ -1993,7 +1996,8 @@ void Client::delayedSetShortcut()
bool Workspace::shortcutAvailable(const KShortcut& cut, Client* ignore) const
{
if (ignore && cut == ignore->shortcut())
return true;
Q_FOREACH (const QKeySequence &seq, cut.toList()) {
if (!KGlobalAccel::getGlobalShortcutsByKey(seq).isEmpty()) {
return false;