about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-10-06T04·47+0800
committerChris Feng <chris.w.feng@gmail.com>2016-10-06T04·47+0800
commit089afdc8ccbd37647f3b9d3b6181db5bcf3e43e9 (patch)
tree3280afd2738790cc597791d420d0006913c1265c /exwm-floating.el
parent575162b6b66a794ea3fc027ddcd72096e30276ab (diff)
Fix problems with active minibuffer
* exwm-floating.el (exwm-floating--unset-floating): Never use the
minibuffer window to display an `exwm-mode' buffer.

* exwm-input.el (exwm-input--on-buffer-list-update)
(exwm-input--update-focus): Allow updating input focus when the
minibuffer is active.
(exwm-input--update-focus): Handle the case when an auto-hiding
minibuffer is active.
(exwm-input--during-key-sequence): Renamed to
`exwm-input--line-mode-passthrough'.
(exwm-input--line-mode-passthrough): New variable for forcing all events
to be passed to Emacs in line-mode.
(exwm-input--on-KeyPress-line-mode, exwm-input-send-next-key): Use it.
(exwm-input--finish-key-sequence, exwm-input--init, exwm-input--exit):
Drop `exwm-input--finish-key-sequence'.
(exwm-input--line-mode-cache): New variable for caching incomplete key
sequences.
(exwm-input--cache-event): New function for handling new key events.
(exwm-input--on-KeyPress-line-mode, exwm-input--on-KeyPress-char-mode):
Use it.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 1780e5fc323b..dffdc3cd11bd 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -337,9 +337,11 @@ context of the corresponding buffer.")
       (setq window-size-fixed nil
             exwm--floating-frame nil
             exwm--frame exwm-workspace--current))
+    ;; Only show X windows in normal state.
     (unless (exwm-layout--iconic-state-p)
-      ;; Only show X windows in normal state.
-      (let ((window (frame-selected-window exwm-workspace--current)))
+      ;; Show it in the selected Emacs window but skip the mini-window.
+      (let ((window (or (minibuffer-selected-window)
+                        (frame-selected-window exwm-workspace--current))))
         (set-window-buffer window buffer)
         (select-window window))))
   (with-current-buffer (exwm--id->buffer id)