diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-08-12T12·28+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-08-12T12·28+0800 |
commit | badf1c30a04cdc008f189c1cdef93c3db7ee7b6d (patch) | |
tree | e53f6c0029fd60aaea5f151226db136891e5a8fe /exwm-workspace.el | |
parent | ebcc9591f3c1210efda007bec6852369b75fa8ad (diff) |
Raise all docks/panels when switching workspace
* exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): Always set the struts value, even it's nil. * exwm-workspace.el (exwm-workspace--update-struts): Check for nil struts values.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index befa8e00bc92..0e078b7cc96c 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -232,18 +232,19 @@ Value nil means to use the default position which is fixed at bottom, while (let (struts struts*) (dolist (pair exwm-workspace--id-struts-alist) (setq struts (cdr pair)) - (dotimes (i 4) - (when (/= 0 (aref struts i)) - (setq struts* - (vector (aref [left right top bottom] i) - (aref struts i) - (when (= 12 (length struts)) - (substring struts (+ 4 (* i 2)) (+ 6 (* i 2)))))) - (if (= 0 (mod i 2)) - ;; Make left/top processed first. - (push struts* exwm-workspace--struts) - (setq exwm-workspace--struts - (append exwm-workspace--struts (list struts*))))))))) + (when struts + (dotimes (i 4) + (when (/= 0 (aref struts i)) + (setq struts* + (vector (aref [left right top bottom] i) + (aref struts i) + (when (= 12 (length struts)) + (substring struts (+ 4 (* i 2)) (+ 6 (* i 2)))))) + (if (= 0 (mod i 2)) + ;; Make left/top processed first. + (push struts* exwm-workspace--struts) + (setq exwm-workspace--struts + (append exwm-workspace--struts (list struts*)))))))))) (defvar exwm-workspace--workareas nil "Workareas (struts excluded).") |