InputMethod: Use new API to pass modifiers map along to clients
This commit is contained in:
parent
9818f4a4e5
commit
518c75a042
2 changed files with 11 additions and 0 deletions
|
@ -514,6 +514,7 @@ void InputMethod::adoptInputMethodContext()
|
|||
connect(inputContext, &KWaylandServer::InputMethodContextV1Interface::preeditString, this, &InputMethod::setPreeditString, Qt::UniqueConnection);
|
||||
connect(inputContext, &KWaylandServer::InputMethodContextV1Interface::preeditCursor, this, &InputMethod::setPreeditCursor, Qt::UniqueConnection);
|
||||
connect(inputContext, &KWaylandServer::InputMethodContextV1Interface::keyboardGrabRequested, this, &InputMethod::installKeyboardGrab, Qt::UniqueConnection);
|
||||
connect(inputContext, &KWaylandServer::InputMethodContextV1Interface::modifiersMap, this, &InputMethod::updateModifiersMap, Qt::UniqueConnection);
|
||||
}
|
||||
|
||||
void InputMethod::updateInputPanelState()
|
||||
|
@ -660,6 +661,15 @@ void InputMethod::installKeyboardGrab(KWaylandServer::InputMethodGrabV1 *keyboar
|
|||
});
|
||||
}
|
||||
|
||||
void InputMethod::updateModifiersMap(const QByteArray &modifiers)
|
||||
{
|
||||
TextInputV2Interface *t2 = waylandServer()->seat()->textInputV2();
|
||||
|
||||
if (t2 && t2->isEnabled()) {
|
||||
t2->setModifiersMap(modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
bool InputMethod::isVisible() const
|
||||
{
|
||||
return m_inputClient && m_inputClient->isShown(false);
|
||||
|
|
|
@ -92,6 +92,7 @@ private:
|
|||
void stopInputMethod();
|
||||
void setTrackedClient(AbstractClient *trackedClient);
|
||||
void installKeyboardGrab(KWaylandServer::InputMethodGrabV1 *keyboardGrab);
|
||||
void updateModifiersMap(const QByteArray &modifiers);
|
||||
|
||||
bool touchEventTriggered() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue