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.
This commit is contained in:
Chris Feng 2016-08-12 20:28:05 +08:00
parent ebcc9591f3
commit badf1c30a0
2 changed files with 19 additions and 26 deletions

20
exwm.el
View file

@ -268,13 +268,9 @@
:window id)))
(when reply
(setq struts (slot-value reply 'value))
(if struts
(if pair
(setcdr pair struts)
(push (cons id struts) exwm-workspace--id-struts-alist))
(when pair
(setq exwm-workspace--id-struts-alist
(assq-delete-all id exwm-workspace--id-struts-alist))))
(if pair
(setcdr pair struts)
(push (cons id struts) exwm-workspace--id-struts-alist))
(exwm-workspace--update-struts))
;; Update workareas and set _NET_WORKAREA.
(exwm-workspace--update-workareas)
@ -291,13 +287,9 @@
(when reply
(setq struts (slot-value reply 'value)
pair (assq id exwm-workspace--id-struts-alist))
(if struts
(if pair
(setcdr pair struts)
(push (cons id struts) exwm-workspace--id-struts-alist))
(when pair
(setq exwm-workspace--id-struts-alist
(assq-delete-all id exwm-workspace--id-struts-alist))))
(if pair
(setcdr pair struts)
(push (cons id struts) exwm-workspace--id-struts-alist))
(exwm-workspace--update-struts))
;; Update workareas and set _NET_WORKAREA.
(exwm-workspace--update-workareas)