diff options
author | jao <jao@gnu.org> | 2025-02-11 04:40:34 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2025-02-11 19:23:53 +0000 |
commit | af4390e1f9152ba1bd3142a5ce5b63313e9747f9 (patch) | |
tree | 16a57104d7700a88b5e9f83f46831530ba2729ce /src/Xmobar/Draw | |
parent | 7390d759240785f660cbdb0ca55898732aa12c98 (diff) | |
download | xmobar-on-click.tar.gz xmobar-on-click.tar.bz2 |
prototype for onClick method in Execon-click
Diffstat (limited to 'src/Xmobar/Draw')
-rw-r--r-- | src/Xmobar/Draw/Cairo.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index 2338b10..cc35631 100644 --- a/src/Xmobar/Draw/Cairo.hs +++ b/src/Xmobar/Draw/Cairo.hs @@ -2,7 +2,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Xmobar.X11.Cairo --- Copyright: (c) 2022, 2023, 2024 Jose Antonio Ortega Ruiz +-- Copyright: (c) 2022, 2023, 2024, 2025 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: jao@gnu.org @@ -124,7 +124,9 @@ drawSegment :: T.DrawContext -> Surface -> Double -> Acc -> Renderinfo -> IO Acc drawSegment dctx surface maxoff (off, acts, boxs) (segment, render, lwidth) = do let end = min maxoff (off + lwidth) (_, info, _, a) = segment - acts' = case a of Just as -> (as, off, end):acts; _ -> acts + acts' = case a of + Just as -> (as, off, end):acts + _ -> ([], off, end):acts bs = C.tBoxes info boxs' = if null bs then boxs else (off, end, bs):boxs when (end > off) $ do @@ -193,4 +195,4 @@ drawSegments dctx surf = do (_, 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) - return as'' + return (reverse as'') |