aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-12-20 19:20:53 +0530
committerAkshay Nair <phenax5@gmail.com>2024-12-20 19:20:53 +0530
commitf96b1395518b2941b2746398094c06d3d40d18f1 (patch)
treecb3c5fe955e4d044f604b477f51374eea1ae6f1d /src
parent4a13725300303940416bd6260af62ba478d30ec5 (diff)
downloadchelleport-f96b1395518b2941b2746398094c06d3d40d18f1.tar.gz
chelleport-f96b1395518b2941b2746398094c06d3d40d18f1.zip
Fix issue with multi monitor support
Diffstat (limited to 'src')
-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