vty 5.24 → 5.24.1
raw patch · 3 files changed
+14/−4 lines, 3 files
Files
- CHANGELOG.md +3/−0
- src/Graphics/Vty.hs +10/−3
- vty.cabal +1/−1
CHANGELOG.md view
@@ -1,4 +1,7 @@ +5.24.1+ - The "shutdown" method of Vty handles is now idempotent (#159)+ 5.24 - Add Generic and NFData instances for some types - Image: remove custom Show instance, add derived Show and Read instances
src/Graphics/Vty.hs view
@@ -52,6 +52,7 @@ import Graphics.Vty.Image import Graphics.Vty.Attributes +import Control.Monad (when) import Control.Concurrent.STM import Data.IORef@@ -115,10 +116,16 @@ intMkVty :: Input -> Output -> IO Vty intMkVty input out = do reserveDisplay out++ shutdownVar <- atomically $ newTVar False let shutdownIo = do- shutdownInput input- releaseDisplay out- releaseTerminal out+ alreadyShutdown <- atomically $ readTVar shutdownVar+ when (not alreadyShutdown) $ do+ atomically $ writeTVar shutdownVar True+ shutdownInput input+ releaseDisplay out+ releaseTerminal out+ lastPicRef <- newIORef Nothing lastUpdateRef <- newIORef Nothing
vty.cabal view
@@ -1,5 +1,5 @@ name: vty-version: 5.24+version: 5.24.1 license: BSD3 license-file: LICENSE author: AUTHORS