Qt 6.11 is out! See what's new in the release
blog
Qt Wayland multi-process, can't acquire inputMethodHints of QWaylandQuickShellSurfaceItem's focused input
-
Hey there,
I'm using wayland compositor in multi-process mode.
I want my compositor to access
inputMethodHintsof another process's focused input (i.e.TextInput).
Within compositor I've got focusedQWaylandQuickShellSurfaceItemof that process.To achieve that I'm doing following:
QInputMethodQueryEvent imQueryEvent(Qt::InputMethodQueries(Qt::ImHints)); QGuiApplication::sendEvent(waylandShellSurface, &imQueryEvent); auto inputMethodHints = Qt::InputMethodHints(imQueryEvent.value(Qt::ImHints).toInt());But as it turns out,
imQueryEventevent hasn't been sent over wayland protocol, so myinputMethodHintsis always equal toQFlags<Qt::InputMethodHint>(ImhNone).
Is there any other way to request focused input ofQWaylandQuickShellSurfaceItemor to fix behavior ofQGuiApplication::sendEventto achieve that?