[xmonad] Mouse focus without entering window

Daniel Wagner dmwit at dmwit.com
Tue Feb 2 02:56:07 UTC 2016


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 at gmail.com>
wrote:

> On Sun, Jan 31, 2016 at 3:26 PM, Daniel Wagner <dmwit at 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 at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20160201/219ee53d/attachment.html>


More information about the xmonad mailing list