Skip to content

Commit

Permalink
Fix ShmClient crash on close request
Browse files Browse the repository at this point in the history
  • Loading branch information
queezle42 committed May 14, 2024
1 parent 64c0947 commit 1178ca3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/ShmClient.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ main = do
traceIO "Connected"

configurationVar <- newEmptyTMVarIO
closeRequestedVar <- newTVarIO False

let properties = defaultWindowProperties {
title = "quasar-wayland-example-client"
}

window <- atomicallyC do
windowManager <- getClientWindowManager @ShmBufferBackend client
newWindow windowManager properties (writeTMVar configurationVar) undefined
newWindow windowManager properties (writeTMVar configurationVar) \case
WindowRequestClose -> writeTVar closeRequestedVar True

forM_ [solidColor, gradient, gradient2, gradient3, gradient4] \img -> do
-- Blocks until first configure event
Expand Down

0 comments on commit 1178ca3

Please sign in to comment.