From ed6a18a697bc1eb8bf09a12c04ffa3200a5248cd Mon Sep 17 00:00:00 2001 From: Adrián Medraño Calvo Date: Sun, 17 Jul 2016 12:00:00 +0000 Subject: 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. --- exwm-input.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'exwm-input.el') 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) -- cgit 1.4.1