diff options
author | David Roundy <droundy@darcs.net> | 2008-02-04 02:05:36 +0100 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2008-02-04 02:05:36 +0100 |
commit | c71bff82345401c39b203bccbc7667b819520f21 (patch) | |
tree | 2a0e0c8847ed57fa1ed51ed0d8ce8106f281df95 | |
parent | 32a6494ee7c0b65e18baab62e61e0c1d33e29d01 (diff) | |
download | XMonadContrib-c71bff82345401c39b203bccbc7667b819520f21.tar.gz XMonadContrib-c71bff82345401c39b203bccbc7667b819520f21.tar.xz XMonadContrib-c71bff82345401c39b203bccbc7667b819520f21.zip |
enable button click for focus in tabbed.
Note that this patch doesn't work with
Thu Dec 27 03:03:56 EST 2007 Spencer Janssen <sjanssen@cse.unl.edu>
* Broadcast button events to all layouts, fix for issue #111
but this isn't a regression, since button events have never worked with
tabbed and this change.
darcs-hash:20080204010536-72aca-3e6f9c697f8e6e26931850d84b56b3f5de917f55.gz
-rw-r--r-- | XMonad/Layout/Decoration.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/XMonad/Layout/Decoration.hs b/XMonad/Layout/Decoration.hs index 4d20ac1..aa3244b 100644 --- a/XMonad/Layout/Decoration.hs +++ b/XMonad/Layout/Decoration.hs @@ -176,8 +176,16 @@ handleEvent :: Shrinker s => s -> Theme -> DecorationState -> Event -> X () handleEvent sh c (DS dwrs fs) e | PropertyEvent {ev_window = w} <- e, w `elem` (map (fst . fst) dwrs) = updateDecos sh c fs dwrs | ExposeEvent {ev_window = w} <- e, w `elem` (map (fst . snd) dwrs) = updateDecos sh c fs dwrs + | ButtonEvent {ev_window = w,ev_event_type = t} <- e, + t == buttonPress, + Just ((mainw,_),_) <- lookFor w dwrs = focus mainw handleEvent _ _ _ _ = return () +lookFor :: Window -> [(OrigWin,DecoWin)] -> Maybe (OrigWin,DecoWin) +lookFor w ((x,(w',y)):zs) | w == w' = Just (x,(w',y)) + | otherwise = lookFor w zs +lookFor _ [] = Nothing + getDWs :: [(OrigWin,DecoWin)] -> [Window] getDWs = map (fst . snd) |