Skip to content

Commit

Permalink
aoeu
Browse files Browse the repository at this point in the history
  • Loading branch information
minimapletinytools committed Dec 30, 2023
1 parent c6eb9a4 commit 5b0be62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Revision history for reflex-vty

## Unreleased
* bump max version for vty to latest (6.1)
* bump max version for base to latest (4.19)
* update to use latest version of vty (for cross-platform support)

## 0.5.1.0
* Change `inputInFocusedRegion` to filter mouse scroll wheel input based on if the region under than the mouse rather than using mouse drag tracking
Expand Down
4 changes: 3 additions & 1 deletion reflex-vty.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ library
ref-tf >= 0.4.0 && < 0.6,
reflex >= 0.9.2 && < 1,
time >= 1.8.0 && < 1.13,
vty >= 5.28 && < 6.2
vty >= 6.0 && < 6.2,
vty-crossplatform >= 0.1 && < 0.5,
vty-unix >= 0.1 && < 0.3
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
Expand Down
8 changes: 6 additions & 2 deletions src/Reflex/Vty/Host.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Reflex
import Reflex.Host.Class
import Reflex.Spider.Orphans ()
import qualified Graphics.Vty as V
import qualified Graphics.Vty.Platform.Unix as V
import Graphics.Vty (DisplayRegion)

-- | A synonym for the underlying vty event type from 'Graphics.Vty'. This should
Expand Down Expand Up @@ -230,5 +231,8 @@ runVtyApp app = do
-- | Returns the standard vty configuration with mouse mode enabled.
getDefaultVty :: IO V.Vty
getDefaultVty = do
cfg <- V.standardIOConfig
V.mkVty $ cfg { V.mouseMode = Just True }
cfg <- V.userConfig
vty <- V.mkVty cfg
liftIO $ V.setMode (V.outputIface vty) V.Mouse True
return vty

0 comments on commit 5b0be62

Please sign in to comment.