diff options
author | mwlochbaum <mwlochbaum@gmail.com> | 2013-02-05 19:28:58 +0100 |
---|---|---|
committer | mwlochbaum <mwlochbaum@gmail.com> | 2013-02-05 19:28:58 +0100 |
commit | 905ee90bad8922aaac5c1408fcdc5370ac388a78 (patch) | |
tree | 59a708e3f4b4916889054a482417f250faafd589 /XMonad/Operations.hs | |
parent | 72564ceef760692469dd90b8f41df49fd2511934 (diff) | |
download | metatile-905ee90bad8922aaac5c1408fcdc5370ac388a78.tar metatile-905ee90bad8922aaac5c1408fcdc5370ac388a78.zip |
configurableEventMasks
Ignore-this: 3848de0f8f5ad5995e87a2a01e7752f
darcs-hash:20130205182858-2314b-e8e2c7286946762cadb2e58ae043b194d681df9e
Diffstat (limited to 'XMonad/Operations.hs')
-rw-r--r-- | XMonad/Operations.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs index bc69962..41fbed0 100644 --- a/XMonad/Operations.hs +++ b/XMonad/Operations.hs @@ -184,9 +184,10 @@ setWMState w v = withDisplay $ \dpy -> do -- | hide. Hide a window by unmapping it, and setting Iconified. hide :: Window -> X () hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do - io $ do selectInput d w (clientMask .&. complement structureNotifyMask) + cMask <- asks $ clientMask . config + io $ do selectInput d w (cMask .&. complement structureNotifyMask) unmapWindow d w - selectInput d w clientMask + selectInput d w cMask setWMState w iconicState -- this part is key: we increment the waitingUnmap counter to distinguish -- between client and xmonad initiated unmaps. @@ -201,15 +202,11 @@ reveal w = withDisplay $ \d -> do io $ mapWindow d w whenX (isClient w) $ modify (\s -> s { mapped = S.insert w (mapped s) }) --- | The client events that xmonad is interested in -clientMask :: EventMask -clientMask = structureNotifyMask .|. enterWindowMask .|. propertyChangeMask - -- | Set some properties when we initially gain control of a window setInitialProperties :: Window -> X () setInitialProperties w = asks normalBorder >>= \nb -> withDisplay $ \d -> do setWMState w iconicState - io $ selectInput d w clientMask + asks (clientMask . config) >>= io . selectInput d w bw <- asks (borderWidth . config) io $ setWindowBorderWidth d w bw -- we must initially set the color of new windows, to maintain invariants |