mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 04:58:00 +01:00
When mapping an X window check if it's on an active workspace
* exwm-layout.el (exwm-layout--refresh): Avoid mapping X windows on inactive workspaces.
This commit is contained in:
parent
13a14579cc
commit
aebcb0344f
1 changed files with 7 additions and 4 deletions
|
@ -48,6 +48,7 @@
|
|||
(declare-function exwm-input--release-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input--grab-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input-grab-keyboard "exwm-input.el")
|
||||
(declare-function exwm-workspace--active-p "exwm-workspace.el" (frame))
|
||||
(declare-function exwm-workspace--client-p "exwm-workspace.el"
|
||||
(&optional frame))
|
||||
(declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el")
|
||||
|
@ -272,7 +273,9 @@ selected by `other-buffer'."
|
|||
;; It may be a buffer waiting to be killed.
|
||||
(exwm--id->buffer exwm--id))
|
||||
(exwm--log "Refresh floating window #x%x" exwm--id)
|
||||
(exwm-layout--show exwm--id window))))
|
||||
(if (exwm-workspace--active-p exwm--frame)
|
||||
(exwm-layout--show exwm--id window)
|
||||
(exwm-layout--hide exwm--id)))))
|
||||
;; Other frames (e.g. terminal/graphical frame of emacsclient)
|
||||
;; We shall bury all `exwm-mode' buffers in this case
|
||||
(setq windows (window-list frame 0)) ;exclude minibuffer
|
||||
|
@ -292,11 +295,11 @@ selected by `other-buffer'."
|
|||
(eq frame exwm--frame)))
|
||||
(setq windows (get-buffer-window-list (current-buffer) 0))
|
||||
(if (not windows)
|
||||
(when (eq frame exwm--frame) ;for exwm-layout-show-all-buffers
|
||||
(exwm-layout--hide exwm--id))
|
||||
(exwm-layout--hide exwm--id)
|
||||
(let ((window (car windows)))
|
||||
(if (eq frame exwm--frame)
|
||||
(exwm-layout--show exwm--id window)
|
||||
(when (exwm-workspace--active-p frame)
|
||||
(exwm-layout--show exwm--id window))
|
||||
(exwm-workspace-move-window frame exwm--id))
|
||||
;; Make sure this buffer is not displayed elsewhere. Note down
|
||||
;; windows displaying an EXWM-buffer now displayed elsewhere; we
|
||||
|
|
Loading…
Reference in a new issue