QPoint QXcbCursor::pos() const { const int dpr = int(m_screen->devicePixelRatio()); QPoint p; queryPointer(connection(), 0, &p); return p / dpr; }
void QXcbCursor::setPos(const QPoint &pos) { xcb_window_t root = 0; queryPointer(connection(), &root, 0); xcb_warp_pointer(xcb_connection(), XCB_NONE, root, 0, 0, 0, 0, pos.x(), pos.y()); xcb_flush(xcb_connection()); }
void QXcbCursor::setPos(const QPoint &pos) { QXcbVirtualDesktop *virtualDesktop = Q_NULLPTR; queryPointer(connection(), &virtualDesktop, 0); xcb_warp_pointer(xcb_connection(), XCB_NONE, virtualDesktop->root(), 0, 0, 0, 0, pos.x(), pos.y()); xcb_flush(xcb_connection()); }
void QXcbCursor::setPos(const QPoint &pos) { const int dpr = int(m_screen->devicePixelRatio()); xcb_window_t root = 0; queryPointer(connection(), &root, 0); xcb_warp_pointer(xcb_connection(), XCB_NONE, root, 0, 0, 0, 0, pos.x()*dpr, pos.y()*dpr); xcb_flush(xcb_connection()); }
void QXcbCursor::setPos(const QPoint &pos) { const QPoint xPos = m_screen->mapToNative(pos); xcb_window_t root = 0; queryPointer(connection(), &root, 0); xcb_warp_pointer(xcb_connection(), XCB_NONE, root, 0, 0, 0, 0, xPos.x(), xPos.y()); xcb_flush(xcb_connection()); }
QPoint QXcbCursor::pos() const { QPoint p; queryPointer(connection(), 0, &p); return m_screen->mapFromNative(p); }
QPoint QXcbCursor::pos() const { QPoint p; queryPointer(connection(), 0, &p); return p; }