Commit 554e17d0 authored by Bhushan Shah's avatar Bhushan Shah 📱 Committed by Bhushan Shah
Browse files

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.
parent 27a62645
......@@ -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
......
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