Use focusObjectWrapper to get the real focus object. (#37)

This commit is contained in:
liulinsong 2022-11-27 12:53:30 +08:00
parent 822406b562
commit af8cc0d56d
1 changed files with 2 additions and 3 deletions

View File

@ -1124,9 +1124,8 @@ QWindow *QFcitxPlatformInputContext::focusWindowWrapper() const {
if (!focusWindow) {
break;
}
QObject *focusObject = qGuiApp->focusObject();
QObject *realFocusObject = deepestFocusProxy(qGuiApp->focusObject());
if (focusObject == realFocusObject) {
QObject *realFocusObject = focusObjectWrapper();
if (qGuiApp->focusObject() == realFocusObject) {
break;
}
auto *widget = qobject_cast<QWidget *>(realFocusObject);