aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2014-10-20 16:10:06 +0200
committerAdam Vogt <vogt.adam@gmail.com>2014-10-20 16:10:06 +0200
commit654ccde280b824c7ce4c55bc232c07dd8b26bf35 (patch)
tree1ec197d23b743a61f993809565257c431f50f13e
parent270c0e2a6998763a3f2b1d7de9722f8537c8b937 (diff)
downloadxmonad-654ccde280b824c7ce4c55bc232c07dd8b26bf35.tar.gz
xmonad-654ccde280b824c7ce4c55bc232c07dd8b26bf35.tar.xz
xmonad-654ccde280b824c7ce4c55bc232c07dd8b26bf35.zip
depend on the setlocale package
Ignore-this: 44289527d6f4e26d7b8c30341523fb91 darcs-hash:20141020141006-1499c-a5f0d4f4372b090a90569eab140c949e73c1062f.gz
Diffstat (limited to '')
-rw-r--r--src/XMonad/Main.hs (renamed from src/XMonad/Main.hsc)14
-rw-r--r--xmonad.cabal1
2 files changed, 3 insertions, 12 deletions
diff --git a/src/XMonad/Main.hsc b/src/XMonad/Main.hs
index 4be4ac6..1208111 100644
--- a/src/XMonad/Main.hsc
+++ b/src/XMonad/Main.hs
@@ -15,6 +15,7 @@
module XMonad.Main (xmonad) where
+import System.Locale.SetLocale
import Control.Arrow (second)
import Data.Bits
import Data.List ((\\))
@@ -26,9 +27,6 @@ import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Monoid (getAll)
-import Foreign.C
-import Foreign.Ptr
-
import System.Environment (getArgs)
import Graphics.X11.Xlib hiding (refreshKeyboardMapping)
@@ -43,14 +41,6 @@ import XMonad.Operations
import System.IO
------------------------------------------------------------------------
--- Locale support
-
-#include <locale.h>
-
-foreign import ccall unsafe "locale.h setlocale"
- c_setlocale :: CInt -> Ptr CChar -> IO (Ptr CChar)
-
-------------------------------------------------------------------------
-- |
-- The main entry point
@@ -58,7 +48,7 @@ foreign import ccall unsafe "locale.h setlocale"
xmonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()
xmonad initxmc = do
-- setup locale information from environment
- withCString "" $ c_setlocale (#const LC_ALL)
+ setLocale LC_ALL Nothing
-- ignore SIGPIPE and SIGCHLD
installSignalHandlers
-- First, wrap the layout in an existential, to keep things pretty:
diff --git a/xmonad.cabal b/xmonad.cabal
index 7b4d125..4a3d726 100644
--- a/xmonad.cabal
+++ b/xmonad.cabal
@@ -59,6 +59,7 @@ library
directory,
extensible-exceptions,
filepath,
+ setlocale,
mtl,
process,
unix,