diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2018-08-16T12·00+0000 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-08-19T00·00+0000 |
commit | d4a772f536eab469b17315e83d843ce3cba3092c (patch) | |
tree | a2d48d721b38d8bf73f13d3d0a0f566279c81f23 /exwm-layout.el | |
parent | f820217d00623489a655c79506816397319eb762 (diff) |
; Comment layout algorithm.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r-- | exwm-layout.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/exwm-layout.el b/exwm-layout.el index b8c5bb333adc..98a27d0ca03f 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -304,25 +304,31 @@ selected by `other-buffer'." (or exwm-layout-show-all-buffers ;; Exclude X windows on other workspaces (eq frame exwm--frame))) - (let ((windows (get-buffer-window-list (current-buffer) 'nomini frame))) + (let (;; List of windows in current frame displaying the `exwm-mode' + ;; buffers. + (windows (get-buffer-window-list (current-buffer) 'nomini + frame))) (if (not windows) (when (eq frame exwm--frame) + ;; Hide it if it was being shown in this workspace. (exwm-layout--hide exwm--id)) (let ((window (car windows))) (if (eq frame exwm--frame) (when (exwm-workspace--active-p frame) + ;; Show it if `frame' is active. (exwm-layout--show exwm--id window)) + ;; It was last shown in other workspace; move it here. (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 - ;; need to display with some other buffer there. + ;; Vacate any other windows (in any workspace) showing this + ;; `exwm-mode' buffer. (setq vacated-windows (append vacated-windows (remove window (get-buffer-window-list (current-buffer) 'nomini t)))) - ;; Note down when an EXWM-buffer is being covered by this - ;; buffer; we don't want it to reappear in some vacated window. + ;; Note any `exwm-mode' buffer is being covered by another + ;; `exwm-mode' buffer. We want to avoid that `exwm-mode' + ;; buffer to be reappear in any of the vacated windows. (let ((prev-buffer (car-safe (car-safe (window-prev-buffers window))))) (and |