Unverified Commit 0d7998fa authored by Oleg `Kanedias` Chernovskiy's avatar Oleg `Kanedias` Chernovskiy
Browse files

Fix mouse wheel scaling same way as click

parent 8911cd56
......@@ -645,8 +645,12 @@ void VncView::wheelEventHandler(QWheelEvent *event)
eb |= 0x8;
const int x = qRound(event->x() / m_horizontalFactor);
const int y = qRound(event->y() / m_verticalFactor);
const auto dpr = devicePixelRatioF();
// We need to restore mouse position in device coordinates.
const QPointF pos = event->position() * dpr;
const int x = qRound(pos.x() / m_horizontalFactor);
const int y = qRound(pos.y() / m_verticalFactor);
vncThread.mouseEvent(x, y, eb | m_buttonMask);
vncThread.mouseEvent(x, y, m_buttonMask);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment