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
commit07120a0562e4a09e189899ef8523aba927cbea0f (patch)
tree023783123da5d28a1d62483999701f7abf551128 /exwm-input.el
parent35e1655dc58d5653d4c3192d12cb5bfe61aa6960 (diff)
Work with workspace frames instead of indices
	* exwm.el (exwm--on-ClientMessage):
	* exwm-workspace.el (exwm-workspace-switch)
	(exwm-workspace-move-window, exwm-workspace-switch-to-buffer):
	* exwm-layout.el (exwm-layout--refresh):
	* exwm-input.el (exwm-input--update-focus)
	(exwm-input--on-ButtonPress): Accept frame as well as workspace
	index as argument.
	* exwm-workspace.el
	(exwm-workspace--workspace-from-frame-or-index): New function.
Diffstat (limited to 'exwm-input.el')
-rw-r--r--exwm-input.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/exwm-input.el b/exwm-input.el
index 22c7a3606b52..b9e47058f003 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -104,7 +104,7 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
 (declare-function exwm-layout--set-state "exwm-layout.el" (id state))
 (declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el")
 (declare-function exwm-workspace-switch "exwm-workspace.el"
-                  (index &optional force))
+                  (frame-or-index &optional force))
 
 (defun exwm-input--update-focus ()
   "Update input focus."
@@ -120,7 +120,7 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
                 (setq exwm-workspace--switch-history-outdated t)
                 (force-mode-line-update)
                 ;; The application may have changed its input focus
-                (exwm-workspace-switch exwm-workspace-current-index t))
+                (exwm-workspace-switch exwm-workspace--current t))
             (exwm--log "Set focus on #x%x" exwm--id)
             (exwm-input--set-focus exwm--id)
             (when exwm--floating-frame
@@ -209,15 +209,13 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
                  (unless (eq frame exwm-workspace--current)
                    (if (exwm-workspace--workspace-p frame)
                        ;; The X window is on another workspace
-                       (exwm-workspace-switch
-                        (exwm-workspace--position frame))
+                       (exwm-workspace-switch 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
-                          (exwm-workspace--position exwm--frame))))))
+                         (exwm-workspace-switch exwm--frame)))))
                  ;; It has been reported that the `window' may have be deleted
                  (if (window-live-p window)
                      (select-window window)