Fix clicking on preedit text
Ignore clicks inside of preedit text for now instead of resulting in an unexpected reset. Change-Id: I9962f3a2a868a9a1afa7b0082fba97ec6cc6c500 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
This commit is contained in:
parent
853f8f6b67
commit
0654dbd90c
@ -185,6 +185,11 @@ void QWaylandTextInput::updateState(Qt::InputMethodQueries queries, uint32_t fla
|
||||
}
|
||||
}
|
||||
|
||||
void QWaylandTextInput::setCursorInsidePreedit(int)
|
||||
{
|
||||
// Not supported yet
|
||||
}
|
||||
|
||||
bool QWaylandTextInput::isInputPanelVisible() const
|
||||
{
|
||||
return m_inputPanelVisible;
|
||||
@ -445,6 +450,15 @@ void QWaylandInputContext::update(Qt::InputMethodQueries queries)
|
||||
textInput()->updateState(queries, QtWayland::zwp_text_input_v2::update_state_change);
|
||||
}
|
||||
|
||||
void QWaylandInputContext::invokeAction(QInputMethod::Action action, int cursorPostion)
|
||||
{
|
||||
if (!textInput())
|
||||
return;
|
||||
|
||||
if (action == QInputMethod::Click)
|
||||
textInput()->setCursorInsidePreedit(cursorPostion);
|
||||
}
|
||||
|
||||
void QWaylandInputContext::showInputPanel()
|
||||
{
|
||||
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
|
||||
|
@ -80,6 +80,8 @@ public:
|
||||
void commit();
|
||||
void updateState(Qt::InputMethodQueries queries, uint32_t flags);
|
||||
|
||||
void setCursorInsidePreedit(int cursor);
|
||||
|
||||
bool isInputPanelVisible() const;
|
||||
QRectF keyboardRect() const;
|
||||
|
||||
@ -138,6 +140,8 @@ public:
|
||||
void commit() Q_DECL_OVERRIDE;
|
||||
void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE;
|
||||
|
||||
void invokeAction(QInputMethod::Action, int cursorPosition) Q_DECL_OVERRIDE;
|
||||
|
||||
void showInputPanel() Q_DECL_OVERRIDE;
|
||||
void hideInputPanel() Q_DECL_OVERRIDE;
|
||||
bool isInputPanelVisible() const Q_DECL_OVERRIDE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user