From 4beda5f4d1067117f2c2786727697f79cf986244 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 11 Feb 2025 04:40:34 +0000 Subject: prototype for onClick method in Exec --- src/Xmobar/Draw/Cairo.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Xmobar/Draw/Cairo.hs') diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index 2338b10..fcedb32 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 -- cgit v1.2.3