also select for enter and leave window events (need for XCrossing?)

This commit is contained in:
Don Stewart 2007-03-09 13:12:51 +00:00
parent f1905e2699
commit 7646f72e45

10
Main.hs
View File

@ -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