diff options
Diffstat (limited to 'lib/Graphics/X11/Xlib/Extras/Extra.hs')
-rw-r--r-- | lib/Graphics/X11/Xlib/Extras/Extra.hs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Graphics/X11/Xlib/Extras/Extra.hs b/lib/Graphics/X11/Xlib/Extras/Extra.hs index d88bf9d..7633f8d 100644 --- a/lib/Graphics/X11/Xlib/Extras/Extra.hs +++ b/lib/Graphics/X11/Xlib/Extras/Extra.hs @@ -1,14 +1,11 @@ module Graphics.X11.Xlib.Extras.Extra where -import Data.Text (Text) +import Codec.Binary.UTF8.String (decode) import Foreign.C.String.Extra (castCCharToWord8) -import qualified Data.ByteString as ByteString -import qualified Data.Text.Encoding.Extra as Text +import Graphics.X11.Xlib.Extras (getWindowProperty8) import qualified Graphics.X11 as X11 -import qualified Graphics.X11.Xlib.Extras as X11 -getWindowPropertyText :: X11.Display -> X11.Atom -> X11.Window -> IO (Maybe Text) -getWindowPropertyText d a w = - fmap (Text.decodeUtf8Lenient . ByteString.pack . map castCCharToWord8) <$> - X11.getWindowProperty8 d a w +getWindowPropertyString :: X11.Display -> X11.Atom -> X11.Window -> IO (Maybe String) +getWindowPropertyString d a w = + fmap (decode . map castCCharToWord8) <$> getWindowProperty8 d a w |