summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-03-09 14:12:51 +0100
committerDon Stewart <dons@cse.unsw.edu.au>2007-03-09 14:12:51 +0100
commit3bbade169123fec5e9721b4efe483b8883fcd941 (patch)
tree277154ff13a35809dfc6d8116316dccc54d33c23 /Main.hs
parent9531f6ecab66d31e5dbd0ca9fe3862641e555b2d (diff)
downloadmetatile-3bbade169123fec5e9721b4efe483b8883fcd941.tar
metatile-3bbade169123fec5e9721b4efe483b8883fcd941.zip
also select for enter and leave window events (need for XCrossing?)
darcs-hash:20070309131251-9c5c1-848d39dc7a257be5a5b62839e5c587d4497dd364
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index 68d82d4..24f7b89 100644
--- a/Main.hs
+++ b/Main.hs
@@ -69,7 +69,11 @@ main = do
runW initState $ do
r <- io $ rootWindow dpy dflt
- io $ do selectInput dpy r (substructureRedirectMask .|. substructureNotifyMask)
+ io $ do selectInput dpy r $ substructureRedirectMask
+ .|. substructureNotifyMask
+ .|. enterWindowMask
+ .|. leaveWindowMask
+
sync dpy False
grabKeys dpy r
(_, _, ws) <- io $ queryTree dpy r
@@ -111,6 +115,10 @@ handle (MapRequestEvent {window = w}) = withDisplay $ \dpy -> do
wa <- io $ getWindowAttributes dpy w
when (not (waOverrideRedirect wa)) $ manage w
+-- XCreateWindowEvent(3X11)
+-- Window manager clients normally should ignore this window if the
+-- override_redirect member is True.
+
handle (DestroyWindowEvent {window = w}) = unmanage w
handle (UnmapEvent {window = w}) = unmanage w