From d8667213fa49242701db4bf592754ab87749efa5 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 20 Dec 2024 21:08:36 +0530 Subject: Add right mouse button click --- src/Chelleport/Control.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Chelleport/Control.hs') diff --git a/src/Chelleport/Control.hs b/src/Chelleport/Control.hs index 38b6c53..2723cd2 100644 --- a/src/Chelleport/Control.hs +++ b/src/Chelleport/Control.hs @@ -20,13 +20,14 @@ instance (MonadIO m) => MonadControl (AppM m) where (DrawContext {ctxX11Display = display}) <- ask liftIO $ do -- Wrap with delay to prevent async window close issues. TODO: Remove maybe? - threadDelay 30_000 + threadDelay 20_000 X11.fakeButtonPress display x11Button X11.sync display False - threadDelay 30_000 + threadDelay 20_000 where x11Button = case btn of LeftClick -> X11.button1 + RightClick -> X11.button3 moveMousePointer x y = do DrawContext {ctxWindow = window} <- ask -- cgit v1.3.1