inputmethod: Listen to text-input enablement changes when starting disabled
We will need to know about it eventually if the user enables the input method. It's guarded with an if so it's no-op.
This commit is contained in:
parent
854aab798d
commit
c6737b1ae0
1 changed files with 2 additions and 5 deletions
|
@ -98,16 +98,13 @@ void InputMethod::init()
|
|||
connect(textInputV2, &TextInputV2Interface::surroundingTextChanged, this, &InputMethod::surroundingTextChanged);
|
||||
connect(textInputV2, &TextInputV2Interface::contentTypeChanged, this, &InputMethod::contentTypeChanged);
|
||||
connect(textInputV2, &TextInputV2Interface::stateUpdated, this, &InputMethod::textInputInterfaceV2StateUpdated);
|
||||
connect(textInputV2, &TextInputV2Interface::enabledChanged, this, &InputMethod::textInputInterfaceV2EnabledChanged);
|
||||
|
||||
TextInputV3Interface *textInputV3 = waylandServer()->seat()->textInputV3();
|
||||
connect(textInputV3, &TextInputV3Interface::surroundingTextChanged, this, &InputMethod::surroundingTextChanged);
|
||||
connect(textInputV3, &TextInputV3Interface::contentTypeChanged, this, &InputMethod::contentTypeChanged);
|
||||
connect(textInputV3, &TextInputV3Interface::stateCommitted, this, &InputMethod::stateCommitted);
|
||||
|
||||
if (m_enabled) {
|
||||
connect(textInputV2, &TextInputV2Interface::enabledChanged, this, &InputMethod::textInputInterfaceV2EnabledChanged);
|
||||
connect(textInputV3, &TextInputV3Interface::enabledChanged, this, &InputMethod::textInputInterfaceV3EnabledChanged);
|
||||
}
|
||||
connect(textInputV3, &TextInputV3Interface::enabledChanged, this, &InputMethod::textInputInterfaceV3EnabledChanged);
|
||||
|
||||
connect(input()->keyboard()->xkb(), &Xkb::modifierStateChanged, this, [this]() {
|
||||
m_hasPendingModifiers = true;
|
||||
|
|
Loading…
Reference in a new issue