Skip to content
Commit d2b028c9 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix Krita forgetting about pressed keys when tapping Ctrl too quickly

Under some circumstances, KeyPress/KeyRelease event comes **after**
a tablet move event with already updated state. It is not very clear
how that happens, but it is surely not impossible. Qt fills modifiers
event property by reading some global storage, so it is possible that
this state is not entirely in sync with the events queue.

The patch does two fixes:

1) KisShortcutMatcher::recoveryModifiersWithoutFocus() used
RecursionNotifier incorrectly, causing keyReleased() and keyPressed()
to reset the state.

2) KisShortcutMatcher::keyReleased() now doesn't reset the state when
discovering inconsistent key release. This change is a bit scary,
because it may lead to longer recovery time when Krita faces a real
trouble with events. But in general it looks "correct".

BUG:438784
(cherry picked from commit 58392a1f)
parent 73460429
Loading
Loading
Loading
Pipeline #120719 skipped with stage
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment