diff options
author | Aaron Denney <wnoise@ofb.net> | 2007-09-30 00:47:55 +0200 |
---|---|---|
committer | Aaron Denney <wnoise@ofb.net> | 2007-09-30 00:47:55 +0200 |
commit | 9221e1e8a78d04b7873bd71ff8c5ff9268b54c77 (patch) | |
tree | 1ea0c8d24742dfec9c503dbd7e608ba7dd8cdf9f | |
parent | 2ff5cd6fd2069ba8fbf8258975de4420a72a25b3 (diff) | |
download | xmonad-9221e1e8a78d04b7873bd71ff8c5ff9268b54c77.tar.gz xmonad-9221e1e8a78d04b7873bd71ff8c5ff9268b54c77.tar.xz xmonad-9221e1e8a78d04b7873bd71ff8c5ff9268b54c77.zip |
On change of keyboard mapping, grabKeys from the root window.
darcs-hash:20070929224755-859d9-9427b5ca7c0c924bd8a841a86cb1cd17dfe511f1.gz
-rw-r--r-- | Main.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -178,9 +178,11 @@ handle (UnmapEvent {ev_window = w, ev_send_event = synthetic}) = whenX (isClient else modify (\s -> s { waitingUnmap = M.adjust pred w (waitingUnmap s) }) -- set keyboard mapping -handle e@(MappingNotifyEvent {ev_window = w}) = do +handle e@(MappingNotifyEvent {}) = do io $ refreshKeyboardMapping e - when (ev_request e == mappingKeyboard) $ withDisplay $ io . flip grabKeys w + when (ev_request e == mappingKeyboard) $ withDisplay $ \dpy -> do + rootw <- asks theRoot + io $ grabKeys dpy rootw -- handle button release, which may finish dragging. handle e@(ButtonEvent {ev_event_type = t}) |