diff options
Diffstat (limited to 'src/client/qwaylandinputcontext.cpp')
-rw-r--r-- | src/client/qwaylandinputcontext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp index dcc4ad5c7..fac5fb840 100644 --- a/src/client/qwaylandinputcontext.cpp +++ b/src/client/qwaylandinputcontext.cpp @@ -541,8 +541,10 @@ void QWaylandInputContext::setFocusObject(QObject *) if (window && window->handle() && inputMethodAccepted()) { if (mCurrentWindow.data() != window) { struct ::wl_surface *surface = static_cast<QWaylandWindow *>(window->handle())->object(); - textInput()->enable(surface); - mCurrentWindow = window; + if (surface) { + textInput()->enable(surface); + mCurrentWindow = window; + } } textInput()->updateState(Qt::ImQueryAll, QtWayland::zwp_text_input_v2::update_state_enter); } |