From a43dad25de3f08b2ae1a5a7bc85c1296dec24014 Mon Sep 17 00:00:00 2001 From: Murilo Miranda Date: Mon, 11 May 2020 22:37:09 -0300 Subject: [PATCH] Moving those 2 functions here I've just moved those 2 functions to simpledisplay. --- simpledisplay.d | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/simpledisplay.d b/simpledisplay.d index 474300e..2d1aa90 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -14760,3 +14760,18 @@ class NotYetImplementedException : Exception { } private alias scriptable = arsd_jsvar_compatible; + +version (linux) +{ + void moveArrowBy(int x, int y) + { + XWarpPointer(XDisplayConnection.get(), None, None, 0, 0, 0, 0, x, y); + XFlush(XDisplayConnection.get()); + } + + void moveArrowTo(int x, int y) + { + moveArrowBy(-10000, -10000); + moveArrowBy(0, 0); + } +}