summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/Bitmap.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-03-30 18:26:01 +0000
committerjao <jao@gnu.org>2024-03-30 18:26:01 +0000
commit30d226ba5eca8847775d03403367dee1f1e3dcfc (patch)
treeb62d0f7f176f9f2b58d66866c3c6afb581334bd6 /src/Xmobar/X11/Bitmap.hs
parent3f4ae1034fe7575df05c59dd0c357fd448198594 (diff)
downloadxmobar-30d226ba5eca8847775d03403367dee1f1e3dcfc.tar.gz
xmobar-30d226ba5eca8847775d03403367dee1f1e3dcfc.tar.bz2
fix for unmet pattern matches warnings (clean build)
Diffstat (limited to 'src/Xmobar/X11/Bitmap.hs')
-rw-r--r--src/Xmobar/X11/Bitmap.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Xmobar/X11/Bitmap.hs b/src/Xmobar/X11/Bitmap.hs
index b14356f..c5304d9 100644
--- a/src/Xmobar/X11/Bitmap.hs
+++ b/src/Xmobar/X11/Bitmap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : X11.Bitmap
--- Copyright : (C) 2013, 2015, 2017, 2018, 2022 Alexander Polakov
+-- Copyright : (C) 2013, 2015, 2017, 2018, 2022, 2024 Alexander Polakov
-- License : BSD3
--
-- Maintainer : jao@gnu.org
@@ -116,8 +116,9 @@ loadBitmap d w p = do
drawBitmap :: Display -> Drawable -> GC -> String -> String
-> Position -> Position -> Bitmap -> IO ()
drawBitmap d p gc fc bc x y i =
- withColors d [fc, bc] $ \[fc', bc'] -> do
- let w = width i
+ withColors d [fc, bc] $ \cs -> do
+ let (fc', bc') = (head cs, cs !! 1)
+ w = width i
h = height i
y' = 1 + y - fromIntegral h `div` 2
setForeground d gc fc'