[xmonad] Emacs frame with STRUT+DOCK doesn't get keyboard focus

Ted Zlatanov tzz at lifelogs.com
Tue Jun 7 18:52:41 CEST 2011


I'm not submitting this as a bug yet because I'm not sure if it's a
XMonad or an Emacs problem.  Here's the code, to be run on a checkout
from the Emacs trunk:

#+begin_src: emacs-lisp
(defun make-special-frame ()
  (let* ((width 200)
         (height 500)
         (ff (make-frame `((visibility . nil)
                           (width . 20)))))
    (x-change-window-property "_NET_WM_STRUT_PARTIAL" `(,width 0 0 0 0 ,height 0 0 0 0 0 0) ff
                              "CARDINAL" 32 t)
    (x-change-window-property "_NET_WM_WINDOW_TYPE" '("_NET_WM_WINDOW_TYPE_DOCK") ff
                              "ATOM" 32 t)
    (make-frame-visible ff)))

(make-special-frame)
#+end_src

The above creates, for me, a new Emacs frame that behaves like a strut
(panel, dock, I'm not sure of the exact terminology).  It's unmoveable
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.

The above works in Metacity and awesome.  Is it a XMonad bug?

Thanks
Ted




More information about the xmonad mailing list