diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-20 19:20:53 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-20 19:20:53 +0530 |
| commit | f96b1395518b2941b2746398094c06d3d40d18f1 (patch) | |
| tree | cb3c5fe955e4d044f604b477f51374eea1ae6f1d | |
| parent | 4a13725300303940416bd6260af62ba478d30ec5 (diff) | |
| download | chelleport-f96b1395518b2941b2746398094c06d3d40d18f1.tar.gz chelleport-f96b1395518b2941b2746398094c06d3d40d18f1.zip | |
Fix issue with multi monitor support
| -rw-r--r-- | src/Chelleport/Control.hs | 3 |
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 |
