about summary refs log tree commit diff
path: root/exwm-input.el
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2016-07-17T12·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2016-07-17T12·00+0000
commited6a18a697bc1eb8bf09a12c04ffa3200a5248cd (patch)
tree167924fdc0c66b19afc068288b2289eb7ccc1098 /exwm-input.el
parentcd1372eaec2521ea163c505b38d36b1f787d1944 (diff)
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.
Diffstat (limited to 'exwm-input.el')
-rw-r--r--exwm-input.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/exwm-input.el b/exwm-input.el
index 67e9a7439a52..d581e7e85785 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -179,6 +179,7 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
 
 (declare-function exwm-floating--start-moveresize "exwm-floating.el"
                   (id &optional type))
+(declare-function exwm-workspace--position "exwm-workspace.el" (frame))
 
 (defvar exwm-workspace--list)
 
@@ -208,14 +209,14 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
                    (if (memq frame exwm-workspace--list)
                        ;; The X window is on another workspace
                        (exwm-workspace-switch
-                        (cl-position frame exwm-workspace--list))
+                        (exwm-workspace--position frame))
                      (with-current-buffer (window-buffer window)
                        (when (and (eq major-mode 'exwm-mode)
                                   (not (eq exwm--frame
                                            exwm-workspace--current)))
                          ;; The floating X window is on another workspace
                          (exwm-workspace-switch
-                          (cl-position exwm--frame exwm-workspace--list))))))
+                          (exwm-workspace--position exwm--frame))))))
                  ;; It has been reported that the `window' may have be deleted
                  (if (window-live-p window)
                      (select-window window)