Commit 399a551b authored by Fuminobu TAKEYAMA's avatar Fuminobu TAKEYAMA Committed by Kurt Hindenburg
Browse files

Notify current cursor position might be changed to input methods

This patch fixes the issue where the input method (e.g. IBus or
Fcitx) window would not be under the cursor.

Also, Qt::ImMicroFocus is depreciated so use Qt::ImCursorRectangle.

BUG:  420799
FIXED-IN: 20.08
(cherry picked from commit d86b0547)
parent 197e8f22
......@@ -130,6 +130,9 @@ void TerminalDisplay::setScreenWindow(ScreenWindow* window)
connect(_screenWindow.data(), &Konsole::ScreenWindow::scrolled, this, [this]() {
_filterUpdateRequired = true;
});
connect(_screenWindow.data(), &Konsole::ScreenWindow::outputChanged, this, [this]() {
QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle);
});
_screenWindow->setWindowLines(_lines);
}
}
......@@ -3391,7 +3394,7 @@ QVariant TerminalDisplay::inputMethodQuery(Qt::InputMethodQuery query) const
{
const QPoint cursorPos = cursorPosition();
switch (query) {
case Qt::ImMicroFocus:
case Qt::ImCursorRectangle:
return imageToWidget(QRect(cursorPos.x(), cursorPos.y(), 1, 1));
case Qt::ImFont:
return font();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment