lxqt / qtermwidget

The terminal widget for QTerminal

Home Page:https://lxqt.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IBus candidate window position is wrong again.

NaofumiHonda opened this issue · comments

Recently I changed an input method from UIM to IBus, and found that the phenomena described in here occur again, however, in this time, konsole behaves normal
(qt 5.15.2, ibus 1.5.25, qtermwidget 1.00).

I checked the source codes of the ibus qt plugin of qt5 and TerminalDisplay.cpp in konsole and found that the position of the candidate window follows the IM's cursor position which is only updated when the ibus qt plugin receives the cursorRectangleChanged() signal.

As a matter of fact, konsole has the following code in TerminalDisplay::setScreenWindow(ScreenWindow* window)
of TerminalDisplay.cpp:
connect(_screenWindow.data(), &Konsole::ScreenWindow::outputChanged, this, []() { QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle); });
for which I cannot find a counterpart in qtermwidget. If add the corresponding code like

connect( _screenWindow , SIGNAL(outputChanged()) , this , SLOT(updateImCursor()) );

to the function void TerminalDisplay::setScreenWindow(ScreenWindow* window) of lib/TerminalDisplay.cpp with

void TerminalDisplay::updateImCursor()
{
             QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle);
}

I confirmed that everything goes well.

This bug report becomes too old and I gave up to use IBus.
I don't know the current status of IBus in qterminal, and thus,
close the issue.