aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2009-11-21 01:48:29 +0100
committerTomas Janousek <tomi@nomi.cz>2009-11-21 01:48:29 +0100
commit884d32c9e7e524a23e227ebe2f454b982b0eb528 (patch)
tree405902ee7957305b2aeec35ca5434d75a6ada5bd /XMonad
parent243317ba62c88e3b96264e613c9dbef88cb19ed2 (diff)
downloadXMonadContrib-884d32c9e7e524a23e227ebe2f454b982b0eb528.tar.gz
XMonadContrib-884d32c9e7e524a23e227ebe2f454b982b0eb528.tar.xz
XMonadContrib-884d32c9e7e524a23e227ebe2f454b982b0eb528.zip
X.H.DynamicLog: fix xmonadPropLog double-encoding of UTF-8
Ignore-this: bde612bbd1a19951f9718a03e737c4ac dynamicLogString utf-8 encodes its output, xmonadPropLog shouldn't do that again. darcs-hash:20091121004829-c9ff5-64b4d4052ae78220e8db863b4dbc77b0a6297174.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Hooks/DynamicLog.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Hooks/DynamicLog.hs b/XMonad/Hooks/DynamicLog.hs
index 27b3cec..c8f4e07 100644
--- a/XMonad/Hooks/DynamicLog.hs
+++ b/XMonad/Hooks/DynamicLog.hs
@@ -58,7 +58,7 @@ module XMonad.Hooks.DynamicLog (
--
import XMonad
import Control.Monad
-import Data.Char ( isSpace )
+import Data.Char ( isSpace, ord )
import Data.Maybe ( isJust, catMaybes )
import Data.List
import qualified Data.Map as M
@@ -66,7 +66,6 @@ import Data.Ord ( comparing )
import qualified XMonad.StackSet as S
import System.IO
-import qualified Codec.Binary.UTF8.String as UTF8
import Foreign.C (CChar)
import XMonad.Util.WorkspaceCompare
@@ -211,7 +210,8 @@ statusBar cmd pp k conf = do
keys' = (`M.singleton` sendMessage ToggleStruts) . k
-- | Write a string to the property _XMONAD_LOG on the root window. This
--- property is of type UTF8_STRING.
+-- property is of type UTF8_STRING. The string must have been processed by
+-- encodeString (dynamicLogString does this).
xmonadPropLog :: String -> X ()
xmonadPropLog msg = do
d <- asks display
@@ -221,7 +221,7 @@ xmonadPropLog msg = do
io $ changeProperty8 d r xlog ustring propModeReplace (encodeCChar msg)
where
encodeCChar :: String -> [CChar]
- encodeCChar = map fromIntegral . UTF8.encode
+ encodeCChar = map (fromIntegral . ord)
-- |
-- Helper function which provides ToggleStruts keybinding