diff options
author | jao <jao@gnu.org> | 2022-11-16 22:34:50 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-11-16 22:34:50 +0000 |
commit | a1d53a49cf39baad07433a3f14979068540a66a8 (patch) | |
tree | c453684bc41de5951ed18ece8fa8448778e7a481 /src/Xmobar | |
parent | 1e58dfb85be69d4a7166e6762f77b7232d3e87d5 (diff) | |
download | xmobar-a1d53a49cf39baad07433a3f14979068540a66a8.tar.gz xmobar-a1d53a49cf39baad07433a3f14979068540a66a8.tar.bz2 |
cairo: fix: don't draw outside maximum allowed offset
Diffstat (limited to 'src/Xmobar')
-rw-r--r-- | src/Xmobar/Draw/Cairo.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index 833935d..43cdc3a 100644 --- a/src/Xmobar/Draw/Cairo.hs +++ b/src/Xmobar/Draw/Cairo.hs @@ -124,8 +124,9 @@ drawSegment dctx surface maxoff (off, acts, boxs) (segment, render, lwidth) = do acts' = case a of Just as -> (as, off, end):acts; _ -> acts bs = C.tBoxes info boxs' = if null bs then boxs else (off, end, bs):boxs - drawSegmentBackground dctx surface info off end - render surface off maxoff + when (end > off) $ do + drawSegmentBackground dctx surface info off end + render surface off maxoff return (off + lwidth, acts', boxs') renderOuterBorder :: C.Config -> Double -> Double -> Cairo.Render () |