diff --git a/src/Quasar/Wayland/Client.hs b/src/Quasar/Wayland/Client.hs index 0e4448d116003187e3f3f4b2e4ca1c0a632845d6..627ccc690ab2e20ee5f6fbafd639dd0d491da206 100644 --- a/src/Quasar/Wayland/Client.hs +++ b/src/Quasar/Wayland/Client.hs @@ -43,6 +43,7 @@ connectWaylandClient = mask_ do newWaylandClient :: MonadResourceManager m => Socket -> m WaylandClient newWaylandClient socket = do ((wlDisplay, registry), connection) <- newWaylandConnection newClientDisplay socket + pure WaylandClient { connection, wlDisplay, @@ -71,4 +72,3 @@ instance HasField "sync" WaylandClient (STM (Awaitable ())) where var <- newAsyncVarSTM lowLevelSync client.wlDisplay \_ -> putAsyncVarSTM_ var () pure $ toAwaitable var - diff --git a/src/Quasar/Wayland/Client/Registry.hs b/src/Quasar/Wayland/Client/Registry.hs index 8d3cac3d39db18820a9101848afd807c0daa3231..32ae64486427a3ed8e65c8bcbdcc17eaf070377c 100644 --- a/src/Quasar/Wayland/Client/Registry.hs +++ b/src/Quasar/Wayland/Client/Registry.hs @@ -44,7 +44,7 @@ createRegistry wlDisplay = mfix \clientRegistry -> do wlRegistry <- wlDisplay.get_registry setMessageHandler wlRegistry (messageHandler clientRegistry) - -- Manual sync (without high-level wrapper) to prevent a dependency loop to the client + -- Manual sync (without high-level wrapper) to prevent a dependency loop to the Client module var <- newAsyncVarSTM lowLevelSync wlDisplay \_ -> putAsyncVarSTM_ var () let initialSyncComplete = toAwaitable var