-
Bug
-
Resolution: Done
-
P2: Important
-
5.11
-
None
-
-
143a6ad82ea0ded69da482eff1750082fd5b2a6a (qt/qtwayland/5.12)
void QWaylandInputContext::update(Qt::InputMethodQueries queries)
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO << queries;
if (!QGuiApplication::focusObject() || !textInput())
return;
if (mCurrentWindow && mCurrentWindow->handle() && !inputMethodAccepted()) {
struct ::wl_surface *surface = static_cast<QWaylandWindow *>(mCurrentWindow->handle())->object();
textInput()->disable(surface);
mCurrentWindow.clear();
} else if (!mCurrentWindow && inputMethodAccepted()) {
QWindow *window = QGuiApplication::focusWindow();
if (window && window->handle()) {
struct ::wl_surface *surface = static_cast<QWaylandWindow *>(window->handle())->object();
#ifdef Q_OS_SYLIXOS // this is a bug for qt.
if (surface) {
#endif
textInput()->enable(surface);
mCurrentWindow = window;
#ifdef Q_OS_SYLIXOS
}
#endif
}
}
textInput()->updateState(queries, QtWayland::zwp_text_input_v2::update_state_change);
}
file: qt5\qtwayland\src\client\qwaylandinputcontext.cpp