Exclude unmanaged floating X windows when refreshing

* exwm-layout.el (exwm-layout--refresh): Do not show unmanaged
floating X windows.
This commit is contained in:
Chris Feng 2016-03-16 12:34:38 +08:00
parent c8c0bc7b60
commit 3cef44a6ca

View file

@ -258,8 +258,10 @@
(when (eq major-mode 'exwm-mode) (when (eq major-mode 'exwm-mode)
(let ((window (frame-first-window frame))) (let ((window (frame-first-window frame)))
(with-current-buffer (window-buffer window) (with-current-buffer (window-buffer window)
(exwm--log "Refresh floating window #x%x" exwm--id) ;; It may be a buffer waiting to be killed.
(exwm-layout--show exwm--id window)))) (when (exwm--id->buffer exwm--id)
(exwm--log "Refresh floating window #x%x" exwm--id)
(exwm-layout--show exwm--id window)))))
;; Other frames (e.g. terminal/graphical frame of emacsclient) ;; Other frames (e.g. terminal/graphical frame of emacsclient)
;; We shall bury all `exwm-mode' buffers in this case ;; We shall bury all `exwm-mode' buffers in this case
(setq windows (window-list frame 0)) ;exclude minibuffer (setq windows (window-list frame 0)) ;exclude minibuffer