mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-05 14:41:56 -07:00
depend on the setlocale package
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
module XMonad.Main (xmonad) where
|
module XMonad.Main (xmonad) where
|
||||||
|
|
||||||
|
import System.Locale.SetLocale
|
||||||
import Control.Arrow (second)
|
import Control.Arrow (second)
|
||||||
import Data.Bits
|
import Data.Bits
|
||||||
import Data.List ((\\))
|
import Data.List ((\\))
|
||||||
@@ -26,9 +27,6 @@ import Control.Monad.State
|
|||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Monoid (getAll)
|
import Data.Monoid (getAll)
|
||||||
|
|
||||||
import Foreign.C
|
|
||||||
import Foreign.Ptr
|
|
||||||
|
|
||||||
import System.Environment (getArgs)
|
import System.Environment (getArgs)
|
||||||
|
|
||||||
import Graphics.X11.Xlib hiding (refreshKeyboardMapping)
|
import Graphics.X11.Xlib hiding (refreshKeyboardMapping)
|
||||||
@@ -42,14 +40,6 @@ import XMonad.Operations
|
|||||||
|
|
||||||
import System.IO
|
import System.IO
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
-- Locale support
|
|
||||||
|
|
||||||
#include <locale.h>
|
|
||||||
|
|
||||||
foreign import ccall unsafe "locale.h setlocale"
|
|
||||||
c_setlocale :: CInt -> Ptr CChar -> IO (Ptr CChar)
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
-- |
|
-- |
|
||||||
@@ -58,7 +48,7 @@ foreign import ccall unsafe "locale.h setlocale"
|
|||||||
xmonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()
|
xmonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO ()
|
||||||
xmonad initxmc = do
|
xmonad initxmc = do
|
||||||
-- setup locale information from environment
|
-- setup locale information from environment
|
||||||
withCString "" $ c_setlocale (#const LC_ALL)
|
setLocale LC_ALL Nothing
|
||||||
-- ignore SIGPIPE and SIGCHLD
|
-- ignore SIGPIPE and SIGCHLD
|
||||||
installSignalHandlers
|
installSignalHandlers
|
||||||
-- First, wrap the layout in an existential, to keep things pretty:
|
-- First, wrap the layout in an existential, to keep things pretty:
|
@@ -59,6 +59,7 @@ library
|
|||||||
directory,
|
directory,
|
||||||
extensible-exceptions,
|
extensible-exceptions,
|
||||||
filepath,
|
filepath,
|
||||||
|
setlocale,
|
||||||
mtl,
|
mtl,
|
||||||
process,
|
process,
|
||||||
unix,
|
unix,
|
||||||
|
Reference in New Issue
Block a user