Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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 inputMethodHints of another process's focused input (i.e. TextInput).
    Within compositor I've got focused QWaylandQuickShellSurfaceItem 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 my inputMethodHints is always equal to QFlags<Qt::InputMethodHint>(ImhNone).
    Is there any other way to request focused input of QWaylandQuickShellSurfaceItem or to fix behavior of QGuiApplication::sendEvent to achieve that?


Log in to reply