From 1085043f0ceb4a3f76e7fed3f9ddd0f2b59cb6c5 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 2 Mar 2008 10:57:12 +0100 Subject: Font and XUtils: add UTF-8 support and various fixes related to XFT - printStringXMF: use the background color for XFT fonts too - textWidthXMF now returns the text width even with xft fonts - textExtentsXMF will now return only the ascend and the descent of a string. - stringPosition now takes the display too - add support for UTF-8 locales: if the contrib library is compiled with the 'with_xft' or the 'with_utf8' option the prompt and the decoration system will support UTF-8 locales - this requires utf8-strings. darcs-hash:20080302095712-32816-f3d6d06ff9d921288b1625e4bfd643013d2075ec.gz --- XMonad/Layout/ShowWName.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad/Layout/ShowWName.hs') diff --git a/XMonad/Layout/ShowWName.hs b/XMonad/Layout/ShowWName.hs index 20d39d6..7169081 100644 --- a/XMonad/Layout/ShowWName.hs +++ b/XMonad/Layout/ShowWName.hs @@ -91,8 +91,8 @@ flashName c (Rectangle _ _ wh ht) wrs = do d <- asks display n <- withWindowSet (return . S.tag . S.workspace . S.current) f <- initXMF (swn_font c) - width <- textWidthXMF d f n - (_,as,ds,_) <- textExtentsXMF f n + width <- textWidthXMF d f n + (as,ds) <- textExtentsXMF f n let hight = as + ds y = (fi ht - hight + 2) `div` 2 x = (fi wh - width + 2) `div` 2 -- cgit v1.2.3