mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
X.H.ServerMode: Only read the first ClientMessage data item
Atoms are at most 32-bit even on 64-bit platforms, per the X protocol, despite them being stored in a CLong. Even if they weren't (and they are, see /usr/include/X11/Xproto.h and https://stackoverflow.com/a/23265984/3407728), xmonadctl isn't unpacking the CLong into multiple data items.
This commit is contained in:
parent
d70128418b
commit
52717dd5fb
@ -93,7 +93,7 @@ serverModeEventHookF key func (ClientMessageEvent {ev_message_type = mt, ev_data
|
||||
d <- asks display
|
||||
atm <- io $ internAtom d key False
|
||||
when (mt == atm && dt /= []) $ do
|
||||
let atom = fromIntegral $ toInteger $ foldr1 (\a b -> a + (b*2^(32::Int))) dt
|
||||
let atom = fromIntegral (head dt)
|
||||
cmd <- io $ getAtomName d atom
|
||||
case cmd of
|
||||
Just command -> func command
|
||||
|
Loading…
x
Reference in New Issue
Block a user