From 2e89e3c781d2ae3d7c395f3d025585130fa87239 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 2 Feb 2015 04:10:26 +0100 Subject: Real fix: Xrender only available if with_xft --- src/Xmobar.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Xmobar.hs') diff --git a/src/Xmobar.hs b/src/Xmobar.hs index 0d63b31..36f6cbb 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -59,6 +59,7 @@ import ColorCache #ifdef XFT import Graphics.X11.Xft +import MinXft (drawBackground) #endif #ifdef DBUS @@ -289,10 +290,16 @@ drawInWin wr@(Rectangle _ _ wid ht) ~[left,center,right] = do p <- io $ createPixmap d w wid ht (defaultDepthOfScreen (defaultScreenOfDisplay d)) +#if XFT when (alpha c /= 255) (io $ drawBackground d p (bgColor c) (alpha c) wr) +#endif withColors d [bgColor c, borderColor c] $ \[bgcolor, bdcolor] -> do gc <- io $ createGC d w +#if XFT when (alpha c == 255) $ do +#else + do +#endif io $ setForeground d gc bgcolor io $ fillRectangle d p gc 0 0 wid ht -- write to the pixmap the new string -- cgit v1.2.3