TextInputV3: Prevent a recursive update call

While scrollEvent,
Qt calls textinput' update with cursorRect
and anchorRect. In that case,
TextInputV3's update function can make
another update calls with saved data from
compositor.
So, commit will be skipped for cursorRect
and anchorRect.

Fixes: QTBUG-126275
Pick-to: 6.8 6.7
Change-Id: I9c47c46b20a227e72488e3b9bac3d6fc5e4b9066
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Inho Lee 2024-06-19 13:14:14 +02:00
parent 6c836fe5fb
commit 0b1d950e43

View File

@ -238,7 +238,6 @@ void QWaylandTextInputv3::updateState(Qt::InputMethodQueries queries, uint32_t f
if (surfaceRect != m_cursorRect) { if (surfaceRect != m_cursorRect) {
set_cursor_rectangle(surfaceRect.x(), surfaceRect.y(), surfaceRect.width(), surfaceRect.height()); set_cursor_rectangle(surfaceRect.x(), surfaceRect.y(), surfaceRect.width(), surfaceRect.height());
m_cursorRect = surfaceRect; m_cursorRect = surfaceRect;
needsCommit = true;
} }
} }