From 3387f92245dae08bc1125829dd542ec2e13c28fd Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Sun, 4 Aug 2024 21:37:33 +0200 Subject: create globals --- highway/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'highway/Main.hs') diff --git a/highway/Main.hs b/highway/Main.hs index 58049df..191279a 100644 --- a/highway/Main.hs +++ b/highway/Main.hs @@ -48,6 +48,7 @@ handleRequest r | Just (BindOutput o) <- fromRequest r = do outputs %= M.insert o Output sendEvent o $ WLOutput.EvGeometry geometry sendEvent o $ WLOutput.EvDone + liftIO $ putStrLn $ "Created output " ++ show o flushEvents | Just ReqSIGINT <- fromRequest r = do c <- interruptedCount <%= (+1) liftIO $ putStrLn $ "Received SIGINT " ++ show c ++ "/3" @@ -59,6 +60,6 @@ main = void $ withDisplay (State M.empty 0) $ do socket <- bindSocket liftIO $ putStrLn $ "Listening on socket: " ++ socket registerSignalEvent ReqSIGINT 2 - output <- registerGlobal BindOutput + output <- registerGlobal BindOutput 4 processRequests handleRequest unregisterGlobal output -- cgit v1.3.1