summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--changelog.md3
-rw-r--r--src/Xmobar/X11/MinXft.hsc8
2 files changed, 4 insertions, 7 deletions
diff --git a/changelog.md b/changelog.md
index 82aa5d9..072932e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -5,6 +5,9 @@ _Bug fixes_
- Fix off-by-one in strut calculation for `Static` position which reserved
space for the panel than necessary and caused issues in some multi-head
setups (fixes #530).
+ - Revert the double-UTF-8 encoding workarounds of 0.36 (#482), as they're no
+ longer necessary with xmonad-contrib master, and aren't needed with any
+ released version of xmonad-contrib either.
## Version 0.37 (November, 2020)
diff --git a/src/Xmobar/X11/MinXft.hsc b/src/Xmobar/X11/MinXft.hsc
index d6861e6..e593da0 100644
--- a/src/Xmobar/X11/MinXft.hsc
+++ b/src/Xmobar/X11/MinXft.hsc
@@ -161,16 +161,10 @@ withAXftDraw d p v c act = do
foreign import ccall "XftDrawStringUtf8"
cXftDrawStringUtf8 :: AXftDraw -> AXftColor -> AXftFont -> CInt -> CInt -> Ptr (#type FcChar8) -> CInt -> IO ()
--- Fixes https://github.com/jaor/xmobar/issues/476
-utf8EncodeString :: Num b => String -> [b]
-utf8EncodeString str = if UTF8.isUTF8Encoded str
- then map (fi . ord) str
- else map fi (UTF8.encode str)
-
drawXftString :: (Integral a1, Integral a) =>
AXftDraw -> AXftColor -> AXftFont -> a -> a1 -> String -> IO ()
drawXftString d c f x y string =
- withArrayLen (utf8EncodeString string)
+ withArrayLen (map fi (UTF8.encode string))
(\len ptr -> cXftDrawStringUtf8 d c f (fi x) (fi y) ptr (fi len))
drawXftString' :: AXftDraw ->