wasm: futureproof EmscriptenMouseEvent
Future versions of emscripten will remove the timestamp, so we need to
replace this with the current timestamp
See a7f058a1e6 (diff-9a5d68085dc7db2938b37a2b7b05c1f5)
Change-Id: I8379d1adee1df1084461fddb1dd2e71684de9657
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
51cc564c50
commit
1538395e3f
@ -547,7 +547,7 @@ void resizeWindow(QWindow *window, QWasmWindow::ResizeMode mode,
|
||||
|
||||
void QWasmEventTranslator::processMouse(int eventType, const EmscriptenMouseEvent *mouseEvent)
|
||||
{
|
||||
auto timestamp = mouseEvent->timestamp;
|
||||
auto timestamp = emscripten_date_now();
|
||||
QPoint targetPoint(mouseEvent->targetX, mouseEvent->targetY);
|
||||
QPoint globalPoint = screen()->geometry().topLeft() + targetPoint;
|
||||
|
||||
@ -673,7 +673,7 @@ int QWasmEventTranslator::wheel_cb(int eventType, const EmscriptenWheelEvent *wh
|
||||
|
||||
QWasmEventTranslator *translator = (QWasmEventTranslator*)userData;
|
||||
Qt::KeyboardModifiers modifiers = translator->translateMouseEventModifier(&mouseEvent);
|
||||
auto timestamp = mouseEvent.timestamp;
|
||||
auto timestamp = emscripten_date_now();
|
||||
QPoint targetPoint(mouseEvent.targetX, mouseEvent.targetY);
|
||||
QPoint globalPoint = eventTranslator->screen()->geometry().topLeft() + targetPoint;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user