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)
Loading
Please register or sign in to comment