aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2008-04-06 03:31:23 +0200
committerLukas Mai <l.mai@web.de>2008-04-06 03:31:23 +0200
commitb7d880c5a784fe0429996e290de7d6903608a298 (patch)
treecee732a47c0a659cd8b7ca1c54af40bb91da8372
parentf8c327a1ca585565b4c3b4994c97b7c329b07947 (diff)
downloadXMonadContrib-b7d880c5a784fe0429996e290de7d6903608a298.tar.gz
XMonadContrib-b7d880c5a784fe0429996e290de7d6903608a298.tar.xz
XMonadContrib-b7d880c5a784fe0429996e290de7d6903608a298.zip
XMonad.Util.Font: don't call setlocale; core does it for us
darcs-hash:20080406013123-462cf-886315685e0e1a8824b384d05d1e89b557047cde.gz
-rw-r--r--XMonad/Util/Font.hsc17
1 files changed, 2 insertions, 15 deletions
diff --git a/XMonad/Util/Font.hsc b/XMonad/Util/Font.hsc
index 5be594d..be6b59e 100644
--- a/XMonad/Util/Font.hsc
+++ b/XMonad/Util/Font.hsc
@@ -45,7 +45,6 @@ import Graphics.X11.Xrender
#if defined XFT || defined UTF8
import Codec.Binary.UTF8.String (encodeString, decodeString)
-import Foreign.C
#endif
-- Hide the Core Font/Xft switching here
@@ -99,14 +98,13 @@ initXMF :: String -> X XMonadFont
initXMF s =
#ifdef XFT
if xftPrefix `isPrefixOf` s then
- do io setupLocale
- dpy <- asks display
+ do dpy <- asks display
xftdraw <- io $ xftFontOpen dpy (defaultScreenOfDisplay dpy) (drop (length xftPrefix) s)
return (Xft xftdraw)
else
#endif
#ifdef UTF8
- (io setupLocale >> initUtf8Font s >>= (return . Utf8))
+ (initUtf8Font s >>= (return . Utf8))
#else
(initCoreFont s >>= (return . Core))
#endif
@@ -213,14 +211,3 @@ encodeOutput = id
-- | Short-hand for 'fromIntegral'
fi :: (Integral a, Num b) => a -> b
fi = fromIntegral
-
-#if defined XFT || defined UTF8
-#include <locale.h>
-foreign import ccall unsafe "locale.h setlocale"
- setlocale :: CInt -> CString -> IO CString
-
-setupLocale :: IO ()
-setupLocale = withCString "" $ \s -> do
- setlocale (#const LC_ALL) s
- return ()
-#endif