From 3b06802b38a232d990d3bf5ff6d31e902e7c3b51 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Thu, 1 May 2008 08:23:57 +0200 Subject: Fix issue #179 by handling events correctly darcs-hash:20080501062357-32816-96fa4684d1a2aa862ff3ad07490ce45832d61a2f.gz --- XMonad/Layout/Decoration.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad/Layout/Decoration.hs') diff --git a/XMonad/Layout/Decoration.hs b/XMonad/Layout/Decoration.hs index 8f6ec21..2fad139 100644 --- a/XMonad/Layout/Decoration.hs +++ b/XMonad/Layout/Decoration.hs @@ -276,9 +276,9 @@ instance (DecorationStyle ds Window, Shrinker s) => LayoutModifier (Decoration d handleEvent :: Shrinker s => s -> Theme -> DecorationState -> Event -> X () handleEvent sh t (DS dwrs fs) e | PropertyEvent {ev_window = w} <- e - , w `elem` (map (fst . fst) dwrs) = updateDecos sh t fs dwrs + , Just i <- w `elemIndex` (map (fst . fst) dwrs) = updateDeco sh t fs (dwrs !! i) | ExposeEvent {ev_window = w} <- e - , w `elem` (catMaybes $ map (fst . snd) dwrs) = updateDecos sh t fs dwrs + , Just i <- w `elemIndex` (catMaybes $ map (fst . snd) dwrs) = updateDeco sh t fs (dwrs !! i) handleEvent _ _ _ _ = return () -- | Mouse focus and mouse drag are handled by the same function, this -- cgit v1.2.3