diff options
author | tv <tv@krebsco.de> | 2023-02-07 02:05:27 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-02-07 02:05:27 +0100 |
commit | 3bd9c00812d91ade512e71a9f8e0f5b8917c3fa7 (patch) | |
tree | 381d87594d44a5439b4140f1e74d968fca9098bd /src/Graphics/X11/Extra.hs | |
parent | 84a56482858d169769490421e3642e7c2c9d542a (diff) |
move atoms to Graphics.X11.Xlib.Atom.Extra
Diffstat (limited to 'src/Graphics/X11/Extra.hs')
-rw-r--r-- | src/Graphics/X11/Extra.hs | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/Graphics/X11/Extra.hs b/src/Graphics/X11/Extra.hs index bed1ba3..ce4cb46 100644 --- a/src/Graphics/X11/Extra.hs +++ b/src/Graphics/X11/Extra.hs @@ -1,24 +1,5 @@ -module Graphics.X11.Extra where +module Graphics.X11.Extra + ( module Graphics.X11.Xlib.Extra + ) where -import Control.Exception (bracket) -import System.Environment (getEnv) -import System.IO.Unsafe (unsafePerformIO) -import qualified Graphics.X11 as X11 - - -unsafeInternAtom :: String -> Bool -> X11.Atom -unsafeInternAtom atomName onlyIfExists = - unsafePerformIO $ withDefaultDisplay $ \display -> - X11.internAtom display atomName onlyIfExists - -defaultDisplayName :: String -defaultDisplayName = - unsafePerformIO (getEnv "DISPLAY") - -withDisplay :: String -> (X11.Display -> IO a) -> IO a -withDisplay display = - bracket (X11.openDisplay display) X11.closeDisplay - -withDefaultDisplay :: (X11.Display -> IO a) -> IO a -withDefaultDisplay = - withDisplay defaultDisplayName +import Graphics.X11.Xlib.Extra |