diff options
author | jao <jao@gnu.org> | 2015-02-02 04:10:26 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2015-02-02 04:10:26 +0100 |
commit | 2e89e3c781d2ae3d7c395f3d025585130fa87239 (patch) | |
tree | a40f0a9304146904810d491964694aa17dbb1b33 /src/Xmobar.hs | |
parent | 9a76e3381ccc69e03ebee00155db1fe4779079da (diff) | |
download | xmobar-2e89e3c781d2ae3d7c395f3d025585130fa87239.tar.gz xmobar-2e89e3c781d2ae3d7c395f3d025585130fa87239.tar.bz2 |
Real fix: Xrender only available if with_xft
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r-- | src/Xmobar.hs | 7 |
1 files changed, 7 insertions, 0 deletions
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 |