diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2024-08-14 21:00:55 +0200 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2024-08-14 21:00:55 +0200 |
| commit | 53c274ad747bfbac34e979bee5f0841f9568c89f (patch) | |
| tree | e6712c05aba55600534816d5984b7f102c616e7a /highway | |
| parent | f4f93ad6e9289d499e1f4c6cf7f9581e622f2d26 (diff) | |
finish codegen
Diffstat (limited to 'highway')
| -rw-r--r-- | highway/Main.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/highway/Main.hs b/highway/Main.hs index 481ec33..0749499 100644 --- a/highway/Main.hs +++ b/highway/Main.hs @@ -22,6 +22,13 @@ geometry = WlOutput.Geometry { WlOutput.geometryX = 0 , WlOutput.geometryTransform = WlOutput.TransformNormal } +mode :: WlOutput.Mode +mode = WlOutput.Mode { WlOutput.modeFlags = [WlOutput.ModeFlagCurrent, WlOutput.ModeFlagPreferred] + , WlOutput.modeWidth = 5120 + , WlOutput.modeHeight = 2880 + , WlOutput.modeRefresh = 60000 + } + data CustomMessage = MsgBindOutput Global (NewObject WlOutput.Object) | MsgDestroyOutput WlOutput.Object @@ -47,7 +54,8 @@ handleMessage m | Just (MsgBindOutput _ o) <- fromMessage m = do output <- createObject o MsgDestroyOutput outs <- outputs <%= M.insert output Output sendEvent output $ WlOutput.EvGeometry geometry - sendEvent output $ WlOutput.EvDone + sendEvent output $ WlOutput.EvMode mode + sendEvent output WlOutput.EvDone liftIO $ putStrLn $ "Output created, outputs: " ++ show outs flushEvents | Just (MsgDestroyOutput o) <- fromMessage m = do outputs %= M.delete o |
