Windows QPA: Fix input context visibility status
QWindowsInputContext::isInputPanelVisible() was ignoring the visibility status of the IME, only returning the status of the Win10 virtual keyboard. This issue caused qtwebengine to try to show the IME multiple times, breaking Asian languages input. Task-number: QTBUG-71753 Change-Id: Iaa4cef37b7dc98a9e0a787750a34d2e98a87a777 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
d9200fcac5
commit
ad2c7f5883
@ -242,7 +242,18 @@ QRectF QWindowsInputContext::keyboardRect() const
|
||||
bool QWindowsInputContext::isInputPanelVisible() const
|
||||
{
|
||||
HWND hwnd = getVirtualKeyboardWindowHandle();
|
||||
return hwnd && ::IsWindowEnabled(hwnd) && ::IsWindowVisible(hwnd);
|
||||
if (hwnd && ::IsWindowEnabled(hwnd) && ::IsWindowVisible(hwnd))
|
||||
return true;
|
||||
// check if the Input Method Editor is open
|
||||
if (inputMethodAccepted()) {
|
||||
if (QWindow *window = QGuiApplication::focusWindow()) {
|
||||
if (QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(window)) {
|
||||
if (HIMC himc = ImmGetContext(platformWindow->handle()))
|
||||
return ImmGetOpenStatus(himc);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void QWindowsInputContext::showInputPanel()
|
||||
|
Loading…
x
Reference in New Issue
Block a user