diff options
Diffstat (limited to '')
-rw-r--r-- | Decoration.hs | 7 | ||||
-rw-r--r-- | Tabbed.hs | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Decoration.hs b/Decoration.hs index d7ec930..e31c93f 100644 --- a/Decoration.hs +++ b/Decoration.hs @@ -11,9 +11,9 @@ import XMonad import Operations ( ModifyWindows(ModifyWindows) ) import qualified StackSet as W -newDecoration :: Rectangle -> Int -> Pixel -> Pixel +newDecoration :: Window -> Rectangle -> Int -> Pixel -> Pixel -> (Display -> Window -> GC -> X ()) -> X () -> X Window -newDecoration (Rectangle x y w h) th fg bg draw click = +newDecoration decfor (Rectangle x y w h) th fg bg draw click = do d <- asks display rt <- asks theRoot n <- (W.tag . W.workspace . W.current) `fmap` gets windowset @@ -33,7 +33,8 @@ newDecoration (Rectangle x y w h) th fg bg draw click = handle_event (ButtonEvent {ev_window = thisw,ev_event_type = t}) | t == buttonPress && thisw == win = click handle_event (AnyEvent {ev_window = thisw, ev_event_type = t}) - | thisw == win && t == expose = draw' + | thisw == win && t == expose = draw' + | thisw == decfor && t == propertyNotify = draw' handle_event _ = return () modify $ \s -> s { layouts = M.insert n (modl l,ls) (layouts s) } return win @@ -29,7 +29,7 @@ dolay sc [w] = return [(w,sc)] dolay sc@(Rectangle x y wid _) ws = do let ts = gentabs x y wid (length ws) tws = zip ts ws - maketab (t,w) = newDecoration t 1 0x000000 0x777777 (drawtab t w) (focus w) + maketab (t,w) = newDecoration w t 1 0x000000 0x777777 (drawtab t w) (focus w) drawtab r@(Rectangle _ _ wt ht) w d w' gc = do nw <- getName w tabcolor <- (maybe 0x888888 (\focusw -> if focusw == w then 0xBBBBBB else 0x888888) . W.peek) `liftM` gets windowset |