mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
Use updated refreshKeyboardMapping. Requires latest X11-extras
This commit is contained in:
parent
fa271e00ce
commit
b63e8c029e
5
Main.hs
5
Main.hs
@ -153,10 +153,7 @@ handle (UnmapEvent {ev_window = w}) = do b <- isClient w; when b $ unman
|
|||||||
|
|
||||||
-- set keyboard mapping
|
-- set keyboard mapping
|
||||||
handle e@(MappingNotifyEvent {ev_window = w}) = do
|
handle e@(MappingNotifyEvent {ev_window = w}) = do
|
||||||
-- this fromIntegral is only necessary with the old X11 version that uses
|
io $ refreshKeyboardMapping e
|
||||||
-- Int instead of CInt. TODO delete it when there is a new release of X11
|
|
||||||
let m = (ev_request e, ev_first_keycode e, fromIntegral $ ev_count e)
|
|
||||||
withDisplay $ \d -> io $ refreshKeyboardMapping d m
|
|
||||||
when (ev_request e == mappingKeyboard) $ withDisplay $ io . flip grabKeys w
|
when (ev_request e == mappingKeyboard) $ withDisplay $ io . flip grabKeys w
|
||||||
|
|
||||||
-- click on an unfocussed window
|
-- click on an unfocussed window
|
||||||
|
Loading…
x
Reference in New Issue
Block a user