From 92b9d423dbe368ee28fc6c6259b669f23ef3a90b Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 7 Oct 2007 18:38:25 +0200 Subject: Tabbed and XPrompt updated to lates Extras changes darcs-hash:20071007163825-32816-8ebe1d13dff1ac21304138a19b6ae883a54f71c7.gz --- Tabbed.hs | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'Tabbed.hs') diff --git a/Tabbed.hs b/Tabbed.hs index 53bc5eb..6f1cdf6 100644 --- a/Tabbed.hs +++ b/Tabbed.hs @@ -142,24 +142,20 @@ handleEvent ishr conf (TabState {tabsWindows = tws, scr = screen, Just x -> do focus x updateTab ishr conf fs width (thisw, x) Nothing -> return () - where - width = rect_width screen`div` fromIntegral (length tws) - -handleEvent ishr conf (TabState {tabsWindows = tws, scr = screen, fontS = fs }) - (AnyEvent {ev_window = thisw, ev_event_type = t }) --- expose - | thisw `elem` (map fst tws) && t == expose = do - updateTab ishr conf fs width (thisw, fromJust $ lookup thisw tws) - where - width = rect_width screen`div` fromIntegral (length tws) -handleEvent ishr conf (TabState {tabsWindows = tws, scr = screen, fontS = fs }) - (PropertyEvent {ev_window = thisw }) + where width = rect_width screen `div` fromIntegral (length tws) -- propertyNotify - | thisw `elem` (map snd tws) = do +handleEvent ishr conf (TabState {tabsWindows = tws, scr = screen, fontS = fs }) + (PropertyEvent {ev_window = thisw }) + | thisw `elem` (map snd tws) = do let tabwin = (fst $ fromJust $ find ((== thisw) . snd) tws, thisw) updateTab ishr conf fs width tabwin - where - width = rect_width screen`div` fromIntegral (length tws) + where width = rect_width screen `div` fromIntegral (length tws) +-- expose +handleEvent ishr conf (TabState {tabsWindows = tws, scr = screen, fontS = fs }) + (ExposeEvent {ev_window = thisw }) + | thisw `elem` (map fst tws) = do + updateTab ishr conf fs width (thisw, fromJust $ lookup thisw tws) + where width = rect_width screen `div` fromIntegral (length tws) handleEvent _ _ _ _ = return () initState :: TConf -> Rectangle -> [Window] -> X TabState -- cgit v1.2.3