Add `exwm-workspace--position' helper

* exwm-workspace.el (exwm-workspace--position): New function.
	* exwm-layout.el (exwm-layout--refresh):
	* exwm-input.el (exwm-input--on-ButtonPress):
	* exwm-workspace.el (exwm-workspace--update-switch-history):
	* exwm.el (exwm--on-ClientMessage, exwm-workspace--init): Use it.
This commit is contained in:
Adrián Medraño Calvo 2016-07-17 12:00:00 +00:00
parent cd1372eaec
commit ed6a18a697
4 changed files with 16 additions and 7 deletions

View file

@ -438,7 +438,7 @@
;; FIXME: check (may require other properties set)
(when (memq xcb:Atom:_NET_WM_STATE_DEMANDS_ATTENTION props)
(when (= action xcb:ewmh:_NET_WM_STATE_ADD)
(let ((idx (cl-position exwm--frame exwm-workspace--list)))
(let ((idx (exwm-workspace--position exwm--frame)))
(unless (= idx exwm-workspace-current-index)
(set-frame-parameter exwm--frame 'exwm--urgency t)
(setq exwm-workspace--switch-history-outdated t))))