Well, I haven't tested it, but the code of `takeTopFocus` looks pretty different to me:

    withWindowSet $ maybe (setFocusX =<< asks theRoot) takeFocusX . W.peek

To me, that reads as "if nothing is focused, focus the root window", whereas the desired behavior is "no matter what's focused right now, focus the window under the mouse". So both the condition and the action to take seem different to me...?

~d 

On Sun, Jan 31, 2016 at 2:06 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Sun, Jan 31, 2016 at 3:26 PM, Daniel Wagner <dmwit@dmwit.com> wrote:
You should be able to do this with the `handleEventHook` [1], for which the `MotionEvent` [2] is the appropriate event to handle. You should be able to use `focus` [3] on the `Window` contained in the event to focus the window the mouse is currently over

Isn't this basically takeTopFocus (i.e. ICCCM WM_TAKE_FOCUS)?

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad