From f96b1395518b2941b2746398094c06d3d40d18f1 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 20 Dec 2024 19:20:53 +0530 Subject: Fix issue with multi monitor support --- src/Chelleport/Control.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.3.1