module Graphics.X11.Xlib.Extras.Extra where import Codec.Binary.UTF8.String (decode) import Foreign.C.String.Extra (castCCharToWord8) import Graphics.X11.Xlib.Extras (getWindowProperty8) import qualified Graphics.X11 as X11 getWindowPropertyString :: X11.Display -> X11.Atom -> X11.Window -> IO (Maybe String) getWindowPropertyString d a w = fmap (decode . map castCCharToWord8) <$> getWindowProperty8 d a w