@@ -104,10 +104,10 @@ bool MouseTouchAdaptor::handleButtonPress(xcb_button_press_event_t *pressEvent)
104 if (button != Qt::LeftButton)
104 if (button != Qt::LeftButton)
105 return true;
105 return true;
107− QPoint windowPos(pressEvent->event_x, pressEvent->event_y);
109 QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(pressEvent->event));
107 QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(pressEvent->event));
109+ QPoint windowPos(pressEvent->event_x / targetWindow->devicePixelRatio(), pressEvent->event_y / targetWindow->devicePixelRatio());
111 QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
111 QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
112 false /* autoCommit */);
112 false /* autoCommit */);
113 touchEvent.press(0 /* touchId */, windowPos);
113 touchEvent.press(0 /* touchId */, windowPos);
@@ -125,10 +125,10 @@ bool MouseTouchAdaptor::handleButtonRelease(xcb_button_release_event_t *releaseE
125 if (button != Qt::LeftButton)
125 if (button != Qt::LeftButton)
126 return true;
126 return true;
128− QPoint windowPos(releaseEvent->event_x, releaseEvent->event_y);
130 QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(releaseEvent->event));
128 QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(releaseEvent->event));
130+ QPoint windowPos(releaseEvent->event_x / targetWindow->devicePixelRatio(), releaseEvent->event_y / targetWindow->devicePixelRatio());
132 QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
132 QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
133 false /* autoCommit */);
133 false /* autoCommit */);
134 touchEvent.release(0 /* touchId */, windowPos);
134 touchEvent.release(0 /* touchId */, windowPos);
@@ -144,10 +144,10 @@ bool MouseTouchAdaptor::handleMotionNotify(xcb_motion_notify_event_t *event)
144 return true;
144 return true;
147− QPoint windowPos(event->event_x, event->event_y);
149 QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(event->event));
147 QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(event->event));
149+ QPoint windowPos(event->event_x / targetWindow->devicePixelRatio(), event->event_y / targetWindow->devicePixelRatio());
151 QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
151 QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
152 false /* autoCommit */);
152 false /* autoCommit */);
153 touchEvent.move(0 /* touchId */, windowPos);
153 touchEvent.move(0 /* touchId */, windowPos);