mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Avoid activating already active X windows
* exwm.el (exwm--on-ClientMessage): On receiving `_NET_ACTIVE_WINDOW' events, check if the requested X windows are already active.
This commit is contained in:
parent
d650159648
commit
5fde63cc45
1 changed files with 8 additions and 3 deletions
11
exwm.el
11
exwm.el
|
@ -416,16 +416,21 @@
|
||||||
(exwm-workspace-switch (elt data 0)))
|
(exwm-workspace-switch (elt data 0)))
|
||||||
;; _NET_ACTIVE_WINDOW.
|
;; _NET_ACTIVE_WINDOW.
|
||||||
((= type xcb:Atom:_NET_ACTIVE_WINDOW)
|
((= type xcb:Atom:_NET_ACTIVE_WINDOW)
|
||||||
(let ((buffer (exwm--id->buffer id)))
|
(let ((buffer (exwm--id->buffer id))
|
||||||
|
iconic window)
|
||||||
(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)
|
||||||
(when (exwm-layout--iconic-state-p)
|
(setq iconic (exwm-layout--iconic-state-p))
|
||||||
|
(when iconic
|
||||||
;; State change: iconic => normal.
|
;; State change: iconic => normal.
|
||||||
(set-window-buffer (frame-selected-window exwm--frame)
|
(set-window-buffer (frame-selected-window exwm--frame)
|
||||||
(current-buffer)))
|
(current-buffer)))
|
||||||
;; Focus transfer.
|
;; Focus transfer.
|
||||||
(select-window (get-buffer-window nil t)))))))
|
(setq window (get-buffer-window nil t))
|
||||||
|
(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