From 2ad1a89db0c9e3704c79294620c5ed4925b143eb Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Fri, 7 Aug 2015 12:41:15 +0800 Subject: 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 --- exwm-workspace.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'exwm-workspace.el') diff --git a/exwm-workspace.el b/exwm-workspace.el index d700f41a14..b1755435ef 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) -- cgit 1.4.1