mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
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:
parent
9c85f172e5
commit
2005fa5c5d
1 changed files with 12 additions and 10 deletions
22
exwm.el
22
exwm.el
|
@ -446,16 +446,18 @@
|
||||||
(when (buffer-live-p buffer)
|
(when (buffer-live-p buffer)
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(when (eq exwm--frame exwm-workspace--current)
|
(when (eq exwm--frame exwm-workspace--current)
|
||||||
(setq iconic (exwm-layout--iconic-state-p))
|
(if exwm--floating-frame
|
||||||
(when iconic
|
(select-frame exwm--floating-frame)
|
||||||
;; State change: iconic => normal.
|
(setq iconic (exwm-layout--iconic-state-p))
|
||||||
(set-window-buffer (frame-selected-window exwm--frame)
|
(when iconic
|
||||||
(current-buffer)))
|
;; State change: iconic => normal.
|
||||||
;; Focus transfer.
|
(set-window-buffer (frame-selected-window exwm--frame)
|
||||||
(setq window (get-buffer-window nil t))
|
(current-buffer)))
|
||||||
(when (or iconic
|
;; Focus transfer.
|
||||||
(not (eq window (selected-window))))
|
(setq window (get-buffer-window nil t))
|
||||||
(select-window window)))))))
|
(when (or iconic
|
||||||
|
(not (eq window (selected-window))))
|
||||||
|
(select-window window))))))))
|
||||||
;; _NET_CLOSE_WINDOW.
|
;; _NET_CLOSE_WINDOW.
|
||||||
((= type xcb:Atom:_NET_CLOSE_WINDOW)
|
((= type xcb:Atom:_NET_CLOSE_WINDOW)
|
||||||
(let ((buffer (exwm--id->buffer id)))
|
(let ((buffer (exwm--id->buffer id)))
|
||||||
|
|
Loading…
Reference in a new issue