fix shortcut available check
and bypass idempotent shortcut setting BUG: 327472 FIXED-IN: 4.11.4 REVIEW: 113807
This commit is contained in:
parent
6e56dcd60a
commit
54a4a4547d
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue