about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-07T04·41+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-07T04·41+0800
commit2ad1a89db0c9e3704c79294620c5ed4925b143eb (patch)
tree00e8f2f85a740453b6e9e205bb9972f1a90b03d1 /exwm-workspace.el
parent1e36a22b3f5fd3867f29eaf3e1891422a3bb952c (diff)
Various input fixes
* Fix `exwm-reset`
* Make input mode buffer local
* Allow window to stay in `char-mode` while setting input focus to other window
  or switching to other workspace
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index d700f41a14c5..b1755435efc4 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -98,20 +98,20 @@
 The optional FORCE option is for internal use only."
   (interactive
    (list
-    (let* ((history-add-new-input nil)  ;prevent modifying history
-           (idx (read-from-minibuffer
-                 "Workspace: " (elt exwm-workspace--switch-history
-                                    exwm-workspace-current-index)
-                 exwm-workspace--switch-map nil
-                 `(exwm-workspace--switch-history
-                   . ,(1+ exwm-workspace-current-index)))))
-      (cl-position idx exwm-workspace--switch-history :test 'equal))))
-  (unless exwm-workspace--switch-lock
+    (unless (and (eq major-mode 'exwm-mode) exwm--fullscreen) ;it's invisible
+      (let* ((history-add-new-input nil)  ;prevent modifying history
+             (idx (read-from-minibuffer
+                   "Workspace: " (elt exwm-workspace--switch-history
+                                      exwm-workspace-current-index)
+                   exwm-workspace--switch-map nil
+                   `(exwm-workspace--switch-history
+                     . ,(1+ exwm-workspace-current-index)))))
+        (cl-position idx exwm-workspace--switch-history :test 'equal)))))
+  (unless (or exwm-workspace--switch-lock (not index))
     (setq exwm-workspace--switch-lock t)
     (unless (and (<= 0 index) (< index exwm-workspace-number))
       (user-error "[EXWM] Workspace index out of range: %d" index))
     (when (or force (/= exwm-workspace-current-index index))
-      (exwm-reset)                      ;exit full screen
       (let ((frame (elt exwm-workspace--list index)))
         (setq exwm-workspace--current frame
               exwm-workspace-current-index index)