Make _NET_ACTIVE_WINDOW working for floating X windows

* exwm.el (exwm--on-ClientMessage): Select floating frames for
floating X windows on receiving _NET_ACTIVE_WINDOW.
This commit is contained in:
Chris Feng 2019-09-22 00:00:00 +00:00
parent 9c85f172e5
commit 2005fa5c5d

View file

@ -446,6 +446,8 @@
(when (buffer-live-p buffer)
(with-current-buffer buffer
(when (eq exwm--frame exwm-workspace--current)
(if exwm--floating-frame
(select-frame exwm--floating-frame)
(setq iconic (exwm-layout--iconic-state-p))
(when iconic
;; State change: iconic => normal.
@ -455,7 +457,7 @@
(setq window (get-buffer-window nil t))
(when (or iconic
(not (eq window (selected-window))))
(select-window window)))))))
(select-window window))))))))
;; _NET_CLOSE_WINDOW.
((= type xcb:Atom:_NET_CLOSE_WINDOW)
(let ((buffer (exwm--id->buffer id)))