diff options
| author | jao <jao@gnu.org> | 2022-11-16 22:35:17 +0000 | 
|---|---|---|
| committer | jao <jao@gnu.org> | 2022-11-16 22:35:17 +0000 | 
| commit | 2a30cb05d0ff98d36bd34eb21de993b23334d4b1 (patch) | |
| tree | 8e5146bd7a0e08def88ad11c5509010c58442ee8 /src | |
| parent | a1d53a49cf39baad07433a3f14979068540a66a8 (diff) | |
| download | xmobar-2a30cb05d0ff98d36bd34eb21de993b23334d4b1.tar.gz xmobar-2a30cb05d0ff98d36bd34eb21de993b23334d4b1.tar.bz2  | |
cairo: recover pre-cairo z-ordering of segments
Diffstat (limited to 'src')
| -rw-r--r-- | src/Xmobar/Draw/Cairo.hs | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index 43cdc3a..d9f7ced 100644 --- a/src/Xmobar/Draw/Cairo.hs +++ b/src/Xmobar/Draw/Cairo.hs @@ -178,12 +178,12 @@ drawSegments dctx surf = do  #ifndef XRENDER    drawCairoBackground dctx surf  #endif -  (_, as, bx) <- foldM (drawSegment dctx surf dw) (0, [], []) llyts +  (lend, as, bx) <- foldM (drawSegment dctx surf dw) (0, [], []) llyts    let [rw, cw] = map sWidth [rlyts, clyts] -      cstart = (dw - cw) / 2.0 -  (cend, as', bx') <- foldM (drawSegment dctx surf dw) (cstart, as, bx) clyts -  let rstart' = dw - rw - 1 -      rstart = if cend > cstart then max rstart' (cend + 1) else rstart' +      rstart = dw - rw - 1 +      cstart = max (lend + 1) ((dw - cw) / 2.0) +      cmax = rstart - 1 +  (_, as', bx') <- foldM (drawSegment dctx surf cmax) (cstart, as, bx) clyts    (_, as'', bx'') <- foldM (drawSegment dctx surf dw) (rstart, as', bx') rlyts    drawBoxes dctx surf (reverse bx'')    when (C.borderWidth conf > 0) (drawBorder conf dw dh surf)  | 
