[xmonad] Emacs frame with STRUT+DOCK doesn't get keyboard focus
Brandon Allbery
allbery.b at gmail.com
Tue Jun 7 20:14:34 CEST 2011
2011/6/7 Ted Zlatanov <tzz at lifelogs.com>:
> On Tue, 7 Jun 2011 13:07:21 -0400 Brandon Allbery <allbery.b at gmail.com> wrote:
> BA> 2011/6/7 Ted Zlatanov <tzz at lifelogs.com>:
>>> and pinned to a window edge. So far so good. But XMonad doesn't give
>>> it the keyboard focus; I can only use the mouse in that frame. That's a
>>> problem since Emacs is mostly keyboard-driven, so it's hard to do much
>>> in that frame.
>
> BA> Most of the dock management stuff does a doIgnore on windows, which
> BA> means they'll never receive keyboard focus. You'll find more flexible
> BA> code in XMonad.Hooks.ManageHelpers for things like this; just leave
> BA> off the doIgnore part.
>
> OK, so it's not a bug? It seems unreasonable to block docks from
> getting the keyboard focus. Why does XMonad do it and others don't?
I suspect it's mostly a matter of cargo cult coding: people blindly
copying code without really understanding what it does. The author of
ManageHelpers understood well enough to include other possibilities.
> Looking at the docs for XMonad.Hooks.ManageHelpers didn't help me much
> (I don't know the XMonad internals and configuration well at all).
Hrm. Have had too many things going on of late and apparently
misremembered; I had been working on extended freedesktop.org support
and thought I'd discovered that I was reinventing parts of
ManageHelpers.
This is from my own package, which is on hold at the moment:
> manageUtility :: ManageHook
> manageUtility = ask >>=
> \win -> liftX (withDisplay $ \dpy -> io $ raiseWindow dpy win) >>
> doFloat
This replaces the "manageDocks" in manageHook, but you still need the
rest of the ManageDocks machinery to handle the struts.
More information about the xmonad
mailing list