From 948ebedab0b47a5c419d3b3836f26df2f6702244 Mon Sep 17 00:00:00 2001 From: Aaron Denney Date: Sun, 30 Sep 2007 00:47:55 +0200 Subject: On change of keyboard mapping, grabKeys from the root window. darcs-hash:20070929224755-859d9-9427b5ca7c0c924bd8a841a86cb1cd17dfe511f1 --- Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Main.hs') diff --git a/Main.hs b/Main.hs index 326955a..39e5dcd 100644 --- a/Main.hs +++ b/Main.hs @@ -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}) -- cgit v1.2.3