Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.15.0
Description
void QWaylandInputDevice::Pointer::pointer_motion(uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y)
Unknown macro: { QWaylandWindow *window = focusWindow(); if (!window) Unknown macro}
QPointF pos(wl_fixed_to_double(surface_x), wl_fixed_to_double(surface_y));
QPointF delta = pos - pos.toPoint();
QPointF global = window->window()->mapToGlobal(pos.toPoint());
global += delta;mSurfacePos = pos;
mGlobalPos = global;
mParent->mTime = time;QWaylandWindow *grab = QWaylandWindow::mouseGrab();
if (grab && grab != window)
Unknown macro:Unknown macro: { // We can't know the true position since we're getting events for another surface, // so we just set it outside of the window boundaries. pos = QPointF(-1, -1); global = grab->window()->mapToGlobal(pos.toPoint()); window = grab; }setFrameEvent(new MotionEvent(window, time, pos, global, mButtons, mParent->modifiers()));
}
Which line is marked in red, isn't considered QWindow's devicePixelsRatio. If QT_SCALE_FACTOR > 1.0, the global point will be incorrect and we use QCursor::pos() function to get global point also be incorrect.