diff options
author | Inho Lee <inho.lee@qt.io> | 2024-01-17 12:03:59 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-01-19 09:42:26 +0000 |
commit | 1867ef129a0076a771a7fbab49398901574fd3ad (patch) | |
tree | d6fbb6599dc794158aa22f7371db4c0b168ef281 | |
parent | 01ef243b5478f249adf0532aa6639de462e9957d (diff) |
TextInputV3: Remove unnecessary enableSurface/disableSurface
zwp_text_input_v3's enter/leave events are doing enable/disable
the surfaces.
enableSurface/disableSurface are called by setFocusObject and
it follows enter/leave.
These redundant routines are removed in TextInputV3
Fixes: QTBUG-120533
Change-Id: I080c67629d7cf9a9029414f5a0ea6735cfe4642a
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 615fffcfaa13da7f5e819d0b39315c77e6ab1817)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/client/qwaylandtextinputv3.cpp | 17 | ||||
-rw-r--r-- | src/client/qwaylandtextinputv3_p.h | 6 |
2 files changed, 5 insertions, 18 deletions
diff --git a/src/client/qwaylandtextinputv3.cpp b/src/client/qwaylandtextinputv3.cpp index 4344667a2..fbd902801 100644 --- a/src/client/qwaylandtextinputv3.cpp +++ b/src/client/qwaylandtextinputv3.cpp @@ -43,7 +43,7 @@ const Qt::InputMethodQueries supportedQueries3 = Qt::ImEnabled | void QWaylandTextInputv3::zwp_text_input_v3_enter(struct ::wl_surface *surface) { - qCDebug(qLcQpaWaylandTextInput) << Q_FUNC_INFO; + qCDebug(qLcQpaWaylandTextInput) << Q_FUNC_INFO << m_surface << surface; m_surface = surface; @@ -185,21 +185,6 @@ void QWaylandTextInputv3::reset() m_pendingPreeditString.clear(); } -void QWaylandTextInputv3::enableSurface(::wl_surface *) -{ - qCDebug(qLcQpaWaylandTextInput) << Q_FUNC_INFO; -} - -void QWaylandTextInputv3::disableSurface(::wl_surface *surface) -{ - qCDebug(qLcQpaWaylandTextInput) << Q_FUNC_INFO; - - if (m_surface != surface) { - qCWarning(qLcQpaWaylandTextInput()) << Q_FUNC_INFO << "for surface" << surface << "focused surface" << m_surface; - return; - } -} - void QWaylandTextInputv3::commit() { m_currentSerial = (m_currentSerial < UINT_MAX) ? m_currentSerial + 1U: 0U; diff --git a/src/client/qwaylandtextinputv3_p.h b/src/client/qwaylandtextinputv3_p.h index 8c5b93b9b..90b393cc0 100644 --- a/src/client/qwaylandtextinputv3_p.h +++ b/src/client/qwaylandtextinputv3_p.h @@ -49,8 +49,10 @@ public: QLocale locale() const override; Qt::LayoutDirection inputDirection() const override; - void enableSurface(::wl_surface *surface) override; - void disableSurface(::wl_surface *surface) override; + // doing nothing in zwp_text_input_v3. + // enter() and leave() takes the role to enable/disable the surface + void enableSurface(::wl_surface *) override {}; + void disableSurface(::wl_surface *) override {}; protected: void zwp_text_input_v3_enter(struct ::wl_surface *surface) override; |