Skip to content

Commit 9ba164d

Browse files
committed
Make mouse movement work on Wayland
1 parent 7304e2d commit 9ba164d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

botfather/engine/desktop/desktop_x11.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,7 @@ void Desktop::warpCursor(const QPoint &position) {
306306
// the desired position and then shake the cursor a little using input to
307307
// make all programs recognise the cursors new position.
308308

309-
// If dest_w is None, XWarpPointer moves the pointer by the offsets (dest_x,
310-
// dest_y) relative to the current position of the pointer.
311-
// https://linux.die.net/man/3/xwarppointer
312-
XWarpPointer(pimpl->display, pimpl->root, pimpl->root, 0, 0, 0, 0,
313-
position.x(), position.y());
314-
XFlush(pimpl->display);
309+
QCursor::setPos(position);
315310

316311
// Shake the mouse using uinput
317312
pimpl->moveCursor(10, 10);

0 commit comments

Comments
 (0)