From 8f9faa8c48c94aaaaf5581aed39e86791c5c8e26 Mon Sep 17 00:00:00 2001 From: liujinchang Date: Tue, 13 Dec 2022 19:43:36 +0800 Subject: [PATCH] fix: in xwayland,XWarpPointer will invaild make it frome xlib to xtest Log: Bug: --- Source/Mouse.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Mouse.cc b/Source/Mouse.cc index 1210c08..3b5791a 100644 --- a/Source/Mouse.cc +++ b/Source/Mouse.cc @@ -569,9 +569,7 @@ void Mouse::SetPos (uint32 x, uint32 y) if (!IsXTestAvailable()) return; // Move default mouse pointer - XWarpPointer (gDisplay, None, - XDefaultRootWindow (gDisplay), - 0, 0, 0, 0, x, y); + XTestFakeMotionEvent (gDisplay, -1, x, y, CurrentTime); // Flush output buffer XSync (gDisplay, False);