Commit eebae29b authored by Andrey Butirsky's avatar Andrey Butirsky

Revert "refactor: localize checkLayoutChange() check"

This reverts commit c459faba

Fixes kwin_x11 crash on typing regression,
see original MR for details
parent 2c6bfdf0
......@@ -197,14 +197,9 @@ void KeyboardInputRedirection::processKey(uint32_t key, InputRedirection::Keyboa
Q_UNREACHABLE();
}
const quint32 previousLayout = m_xkb->currentLayout();
if (!autoRepeat) {
const quint32 previousLayout = m_xkb->currentLayout();
m_xkb->updateKey(key, state);
if (m_xkb->modifiers() == Qt::KeyboardModifier::NoModifier && type != QEvent::KeyRelease) {
m_keyboardLayout->checkLayoutChange(previousLayout);
}
}
const xkb_keysym_t keySym = m_xkb->currentKeysym();
......@@ -226,6 +221,10 @@ void KeyboardInputRedirection::processKey(uint32_t key, InputRedirection::Keyboa
m_input->processFilters(std::bind(&InputEventFilter::keyEvent, std::placeholders::_1, &event));
m_xkb->forwardModifiers();
if (event.modifiersRelevantForGlobalShortcuts() == Qt::KeyboardModifier::NoModifier && type != QEvent::KeyRelease) {
m_keyboardLayout->checkLayoutChange(previousLayout);
}
}
void KeyboardInputRedirection::processModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment