diff options
author | Dominik Holland <dominik.holland@qt.io> | 2020-06-08 15:55:11 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2022-03-15 13:59:17 +0100 |
commit | 2f1b74e5b325fc4f44143c53507a31fe59bd8003 (patch) | |
tree | b59226851b183023dec3ae77249383d891a875aa /src/compositor/extensions/qwaylandtextinput.cpp | |
parent | 484af9cb042c075815200e571695b881b9e6130c (diff) |
Also accept a client text-input extension registered too late
When the wayland surface gets initialized at the compositor
side, the compositor checks whether the text-input extension
is available and connects to its signal.
If the client doesn't create the extension before the
initialization on the compositor side happens, the
InputMethodControl of the surface is not connected to the
text-input extension and doesn't work correctly.
In this case the connection should be made once the extension
is available.
Change-Id: Icdd015f1d7853fe2f191b91a87d25f196f6b7769
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandtextinput.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandtextinput.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandtextinput.cpp b/src/compositor/extensions/qwaylandtextinput.cpp index 6be9c0cde..845ee6f7c 100644 --- a/src/compositor/extensions/qwaylandtextinput.cpp +++ b/src/compositor/extensions/qwaylandtextinput.cpp @@ -36,6 +36,7 @@ #include "qwaylandsurface.h" #include "qwaylandview.h" #include "qwaylandinputmethodeventbuilder_p.h" +#include "qwaylandinputmethodcontrol.h" #include <QGuiApplication> #include <QInputMethodEvent> @@ -335,6 +336,11 @@ void QWaylandTextInputPrivate::zwp_text_input_v2_enable(Resource *resource, wl_r QWaylandSurface *s = QWaylandSurface::fromResource(surface); enabledSurfaces.insert(resource, s); + + QWaylandInputMethodControl *control = s->inputMethodControl(); + if (control) + control->updateTextInput(); + emit q->surfaceEnabled(s); } |