about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-10-19T06·59+0800
committerChris Feng <chris.w.feng@gmail.com>2015-10-19T06·59+0800
commit463d0da41139ccf48c9c0c9522c93041769dfcdb (patch)
tree4529c528a64c14a68a2216257d9f5fa6a113e90b
parente70c6fad56d0290890d75322c2f5335173624549 (diff)
Close the (possible) active minibuffer when switching workspace
* exwm-workspace.el (exwm-workspace-switch): An active minibuffer on another
  workspace might cause problems for input.  Closing it should be
  sufficient.
-rw-r--r--exwm-workspace.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 566ea539b641..0813c89219ac 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -138,6 +138,8 @@ The optional FORCE option is for internal use only."
               (setq x (/ w 2)
                     y (/ h 2)))
             (set-mouse-pixel-position frame x y)))
+        ;; Close the (possible) active minibuffer
+        (when (active-minibuffer-window) (abort-recursive-edit))
         (setq default-minibuffer-frame frame)
         ;; Hide windows in other workspaces by preprending a space
         (unless exwm-workspace-show-all-buffers