textinput: introduce a signal for when the state should be committed
In v1 to v3 of textinput protocol, updates for the text input state needs to be updated explcitly using commit or update state request, so send out this information to compositor, which can use it to update the input method state.
This commit is contained in:
parent
03f5339302
commit
8ab656541b
2 changed files with 6 additions and 1 deletions
|
@ -396,6 +396,11 @@ Q_SIGNALS:
|
|||
* @see surface
|
||||
**/
|
||||
void enabledChanged();
|
||||
/**
|
||||
* Emitted whenever TextInputInterface should commit the current state.
|
||||
* @see requestReset
|
||||
**/
|
||||
void stateCommitted(uint32_t serial);
|
||||
|
||||
protected:
|
||||
class Private;
|
||||
|
|
|
@ -224,11 +224,11 @@ void TextInputUnstableV2Interface::Private::updateStateCallback(wl_client *clien
|
|||
{
|
||||
auto p = cast<Private>(resource);
|
||||
Q_ASSERT(*p->client == client);
|
||||
Q_UNUSED(serial)
|
||||
// TODO: use other reason values reason
|
||||
if (reason == ZWP_TEXT_INPUT_V2_UPDATE_STATE_RESET) {
|
||||
emit p->q_func()->requestReset();
|
||||
}
|
||||
emit p->q_func()->stateCommitted(serial);
|
||||
}
|
||||
|
||||
TextInputInterface::ContentHints TextInputUnstableV2Interface::Private::convertContentHint(uint32_t hint) const
|
||||
|
|
Loading…
Reference in a new issue