aboutsummaryrefslogtreecommitdiffstats
path: root/Decoration.hs
diff options
context:
space:
mode:
authorJason Creighton <jcreigh@gmail.com>2007-06-11 04:14:08 +0200
committerJason Creighton <jcreigh@gmail.com>2007-06-11 04:14:08 +0200
commite6eb5e25a70b6be61f489d273ba58b144cd13f31 (patch)
treec688f20f7226fb41807af9d71f2a2f231b98d3e6 /Decoration.hs
parentaacba82c15c390c980a62a4bebf7b1d0244ecd9a (diff)
downloadXMonadContrib-e6eb5e25a70b6be61f489d273ba58b144cd13f31.tar.gz
XMonadContrib-e6eb5e25a70b6be61f489d273ba58b144cd13f31.tar.xz
XMonadContrib-e6eb5e25a70b6be61f489d273ba58b144cd13f31.zip
redraw decorations on PropertyNotify
newDecoration now takes a Window parameter, which is the window the decoration is "for". If there is a PropertyNotify for that window, the decoration is redrawn. darcs-hash:20070611021408-b9aa7-b01860371ef9e47a06ab4541aee09422c8f19865.gz
Diffstat (limited to 'Decoration.hs')
-rw-r--r--Decoration.hs7
1 files changed, 4 insertions, 3 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