wasm: set focus on canvas on new screen
This allows user to utilize the application without having to click on it first to cause the focus-in event. Change-Id: Ibc9582254dda91eb14ebcdf4b8ea4a4f862aa88d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
9608e996a2
commit
c978de990b
@ -54,6 +54,8 @@ QWasmScreen::QWasmScreen(const QString &canvasId)
|
|||||||
m_compositor = new QWasmCompositor(this);
|
m_compositor = new QWasmCompositor(this);
|
||||||
m_eventTranslator = new QWasmEventTranslator(this);
|
m_eventTranslator = new QWasmEventTranslator(this);
|
||||||
updateQScreenAndCanvasRenderSize();
|
updateQScreenAndCanvasRenderSize();
|
||||||
|
emscripten::val canvas = emscripten::val::global(m_canvasId.toUtf8().constData());
|
||||||
|
canvas.call<void>("focus");
|
||||||
}
|
}
|
||||||
|
|
||||||
QWasmScreen::~QWasmScreen()
|
QWasmScreen::~QWasmScreen()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user