about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-03-25T05·57+0800
committerChris Feng <chris.w.feng@gmail.com>2016-03-25T05·57+0800
commitfa204e136718e106a87414dd145d16748d5b7262 (patch)
treee156dda1ea4607b1f97f6e4b3298776bb6cd6e8c /exwm-layout.el
parent44d05d2dd3e8214ef8815f7433758e9e155db3c9 (diff)
Fix emacsclient issues
* exwm-layout.el (exwm-layout--on-minibuffer-setup)
(exwm-layout--on-echo-area-change):
* exwm-workspace.el (exwm-workspace--on-minibuffer-setup)
(exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty)
(exwm-workspace--on-echo-area-clear):
Exclude non-graphical frames.

* exwm.el (exwm--server-eval-at): Avoid using `x-dispaly-name'.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 095e4611b107..c392ff972446 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -353,16 +353,19 @@ selected by `other-buffer'."
 
 (defun exwm-layout--on-minibuffer-setup ()
   "Refresh layout when minibuffer grows."
-  (run-with-idle-timer 0.01 nil         ;FIXME
-                       (lambda ()
-                         (when (< 1 (window-height (minibuffer-window)))
-                           (exwm-layout--refresh))))
-  ;; Set input focus on the Emacs frame
-  (x-focus-frame (window-frame (minibuffer-selected-window))))
+  (when (frame-parameter nil 'exwm-outer-id)
+    (run-with-idle-timer 0.01 nil         ;FIXME
+                         (lambda ()
+                           (when (< 1 (window-height (minibuffer-window)))
+                             (exwm-layout--refresh))))
+    ;; Set input focus on the Emacs frame
+    (x-focus-frame (window-frame (minibuffer-selected-window)))))
 
 (defun exwm-layout--on-echo-area-change (&optional dirty)
   "Run when message arrives or in `echo-area-clear-hook' to refresh layout."
   (when (and (current-message)
+             ;; Exclude non-graphical frames.
+             (frame-parameter nil 'exwm-outer-id)
              (or (cl-position ?\n (current-message))
                  (> (length (current-message))
                     (frame-width exwm-workspace--current))))