Priority: P3: Somewhat important
Affects Version/s: None
Fix Version/s: None
Component/s: QPA: Wayland
Proof of concept patch: 
Text input protocol enables input method support at compositor-side. Qt Wayland implements the protocol but does not expose API for switching input method at run-time. Qt applications traditionally have selected input method at start up (set via QT_IM_MODULE) and did not offer a way to switch to a different input method at run-time. We have an accessor QPlatformIntegration::inputContext(), but do not have a setter.
Restarting an application to switch an input method might be inconvenient for some users, but to restart a text-input enabled compositor to switch, for example, from virtual keyboard to 'compose' input context is not acceptable user experience. Hence the need for this API.
Input context plugins might need some adjusting to take into consideration that they can be loaded at other time, not just on start up. E.g: https://codereview.qt-project.org/#/c/255896/
The patch currently uses Proxy class, which is sub-optimal due to code duplication (see qwaylandcompositorintegration_p.h). Other option would be to introduce QPlatformIntegration::setInputContext(ctx). With multi-seat support it would look something more like:
As a temporary solution to address the issue purely in Qt Wayland compositor and to avoid the mentioned bloat of proxy class, we can add override function in QPlatformIntegration::inputContext(). Pseudo code:
If vkb not created on startup (via QT_IM_MODULE=qtvirtualkeyboard) it uses the size of physical screen, instead of the size of the nested compositor. It could be an issue in qt wayland or in qtvirtualkeyboard plugin or in .