@@ -228,28 +228,36 @@ void QmlStreamer::Impl::_requestUpdate()
228
228
229
229
void QmlStreamer::Impl::_onPressed ( double x_, double y_ )
230
230
{
231
- QPoint point ( x_ * width (), y_ * height ( ));
231
+ const QPoint point ( x_ * width (), y_ * height ( ));
232
232
QMouseEvent* e = new QMouseEvent ( QEvent::MouseButtonPress, point,
233
233
Qt::LeftButton, Qt::LeftButton,
234
234
Qt::NoModifier );
235
- QCoreApplication::postEvent ( this , e );
235
+ QCoreApplication::postEvent ( _quickWindow , e );
236
236
}
237
237
238
238
void QmlStreamer::Impl::_onMoved ( double x_, double y_ )
239
239
{
240
- QPoint point ( x_ * width (), y_ * height ( ));
240
+ const QPoint point ( x_ * width (), y_ * height ( ));
241
241
QMouseEvent* e = new QMouseEvent ( QEvent::MouseMove, point, Qt::LeftButton,
242
242
Qt::LeftButton, Qt::NoModifier );
243
- QCoreApplication::postEvent ( this , e );
243
+ QCoreApplication::postEvent ( _quickWindow , e );
244
244
}
245
245
246
246
void QmlStreamer::Impl::_onReleased ( double x_, double y_ )
247
247
{
248
- QPoint point ( x_ * width (), y_ * height ( ));
248
+ const QPoint point ( x_ * width (), y_ * height ( ));
249
249
QMouseEvent* e = new QMouseEvent ( QEvent::MouseButtonRelease, point,
250
250
Qt::LeftButton, Qt::NoButton,
251
251
Qt::NoModifier );
252
- QCoreApplication::postEvent ( this , e );
252
+ QCoreApplication::postEvent ( _quickWindow, e );
253
+ }
254
+
255
+ void QmlStreamer::Impl::_onWheeled ( double x_, double y_, double deltaY )
256
+ {
257
+ const QPoint point ( x_ * width (), y_ * height ( ));
258
+ QWheelEvent* e = new QWheelEvent ( point, deltaY, Qt::NoButton,
259
+ Qt::NoModifier, Qt::Vertical );
260
+ QCoreApplication::postEvent ( _quickWindow, e );
253
261
}
254
262
255
263
void QmlStreamer::Impl::_onResized ( double x_, double y_ )
@@ -340,6 +348,9 @@ bool QmlStreamer::Impl::_setupDeflectStream()
340
348
this , &QmlStreamer::Impl::_onMoved );
341
349
connect ( _eventHandler, &EventReceiver::resized,
342
350
this , &QmlStreamer::Impl::_onResized );
351
+ connect ( _eventHandler, &EventReceiver::wheeled,
352
+ this , &QmlStreamer::Impl::_onWheeled );
353
+
343
354
return true ;
344
355
}
345
356
0 commit comments