[Xmonad] bugginess on x86-64 in focus-follows-mouse

David Roundy droundy at darcs.net
Tue May 15 22:02:50 EDT 2007


Hi all,

I just this morning installed xmonad on my computer at work, and I've run
into some bugginess in focus-follows-mouse on this computer: it doesn't
work! The only difference that seems notable is that this is a 64-bit
machine, while my home computer is 32-bit.  In any case, the bugginess is
just tha focus doesn't follow mouse.

After some tracing, I discovered that the problem was that the ev_mode is
weird.  The following debug code in Main (right before the trace at the
bottom) reveals that

handle e@(CrossingEvent {ev_window = w, ev_event_type = t})
    | t == enterNotify  && ev_detail e /= notifyInferior
    = trace ("mode must be abnormal "++show (ev_mode e) ++ " vs " ++ show (ev_mode e `mod` 16))

mode must be abnormal 17179869184 vs 0
mode must be abnormal 8589934593 vs 1

Now according to the docs, ev_mode should be a small integer.  I suspect
that we're seeing here an Int vs CInt issue.  :( I've glanced at the code,
but really have no idea how to read a .hsc file.  In the meantime, we can
work around the bug by using the above `mod` in our crossing check.  I'll
send a patch shortly (although you're welcome to replace it with a real
fix, but since the x11 package is included in ghc's distribution, I think
some sort of workaround is in order).
-- 
David Roundy
Department of Physics
Oregon State University


More information about the Xmonad mailing list