Qt Wayland multi-process, can't acquire inputMethodHints of QWaylandQuickShellSurfaceItem's focused input
Unsolved
QML and Qt Quick
-
Hey there,
I'm using wayland compositor in multi-process mode.
I want my compositor to access
inputMethodHints
of another process's focused input (i.e.TextInput
).
Within compositor I've got focusedQWaylandQuickShellSurfaceItem
of 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,
imQueryEvent
event hasn't been sent over wayland protocol, so myinputMethodHints
is always equal toQFlags<Qt::InputMethodHint>(ImhNone)
.
Is there any other way to request focused input ofQWaylandQuickShellSurfaceItem
or to fix behavior ofQGuiApplication::sendEvent
to achieve that?