diff --git a/src/wayland/server/textinput_interface.h b/src/wayland/server/textinput_interface.h index b3f1072571..244ede65e8 100644 --- a/src/wayland/server/textinput_interface.h +++ b/src/wayland/server/textinput_interface.h @@ -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; diff --git a/src/wayland/server/textinput_interface_v2.cpp b/src/wayland/server/textinput_interface_v2.cpp index b0b58133f8..2af01c0f80 100644 --- a/src/wayland/server/textinput_interface_v2.cpp +++ b/src/wayland/server/textinput_interface_v2.cpp @@ -224,11 +224,11 @@ void TextInputUnstableV2Interface::Private::updateStateCallback(wl_client *clien { auto p = cast(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