emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm d4a772f 10/12: ; Comment layout algorithm.


From: Chris Feng
Subject: [elpa] externals/exwm d4a772f 10/12: ; Comment layout algorithm.
Date: Sun, 19 Aug 2018 12:46:00 -0400 (EDT)

branch: externals/exwm
commit d4a772f536eab469b17315e83d843ce3cba3092c
Author: Adrián Medraño Calvo <address@hidden>
Commit: Chris Feng <address@hidden>

    ; Comment layout algorithm.
---
 exwm-layout.el | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/exwm-layout.el b/exwm-layout.el
index b8c5bb3..98a27d0 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]