aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Chelleport/Control.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Chelleport/Control.hs b/src/Chelleport/Control.hs
index 46c7903..2ad2a34 100644
--- a/src/Chelleport/Control.hs
+++ b/src/Chelleport/Control.hs
@@ -29,7 +29,8 @@ instance (MonadIO m) => MonadControl (AppM m) where
LeftClick -> X11.button1
moveMousePointer x y = do
- SDL.warpMouse SDL.WarpGlobal (SDL.P $ SDL.V2 x y)
+ DrawContext {ctxWindow = window} <- ask
+ SDL.warpMouse (SDL.WarpInWindow window) (SDL.P $ SDL.V2 x y)
getMousePointerPosition = do
(SDL.P (SDL.V2 x y)) <- SDL.getAbsoluteMouseLocation