mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
also select for enter and leave window events (need for XCrossing?)
This commit is contained in:
parent
f1905e2699
commit
7646f72e45
10
Main.hs
10
Main.hs
@ -69,7 +69,11 @@ main = do
|
|||||||
|
|
||||||
runW initState $ do
|
runW initState $ do
|
||||||
r <- io $ rootWindow dpy dflt
|
r <- io $ rootWindow dpy dflt
|
||||||
io $ do selectInput dpy r (substructureRedirectMask .|. substructureNotifyMask)
|
io $ do selectInput dpy r $ substructureRedirectMask
|
||||||
|
.|. substructureNotifyMask
|
||||||
|
.|. enterWindowMask
|
||||||
|
.|. leaveWindowMask
|
||||||
|
|
||||||
sync dpy False
|
sync dpy False
|
||||||
grabKeys dpy r
|
grabKeys dpy r
|
||||||
(_, _, ws) <- io $ queryTree dpy r
|
(_, _, ws) <- io $ queryTree dpy r
|
||||||
@ -111,6 +115,10 @@ handle (MapRequestEvent {window = w}) = withDisplay $ \dpy -> do
|
|||||||
wa <- io $ getWindowAttributes dpy w
|
wa <- io $ getWindowAttributes dpy w
|
||||||
when (not (waOverrideRedirect wa)) $ manage 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 (DestroyWindowEvent {window = w}) = unmanage w
|
||||||
handle (UnmapEvent {window = w}) = unmanage w
|
handle (UnmapEvent {window = w}) = unmanage w
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user