about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-02-21T12·19+0800
committerChris Feng <chris.w.feng@gmail.com>2016-02-21T12·19+0800
commit55cec760ca3cee21e735bff9a9a5229b222b97ff (patch)
treef6593789633637697906259b5a3b2103de815343 /exwm-workspace.el
parent7116b01b0c9b7efda105487a17192470c466b9c4 (diff)
Fix emacsclient related issues
* exwm-systemtray.el (exwm-systemtray-height): The value is not available
when emacsclient has just loaded the library (and it crashes emacsclient).

* exwm-workspace.el (exwm-workspace--init): Set `default-minibuffer-frame'
later to prevent it from being modified when using emacsclient.

* exwm-floating.el:
* exwm-randr.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm.el: Use `exwm-workspace--minibuffer-own-frame-p' instead of the raw
variable.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 99bc605e5f20..07bfdd9d5e37 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -274,7 +274,7 @@ The optional FORCE option is for internal use only."
                                  (frame-parameter frame 'exwm-workspace)
                                  :x x :y y))
               (xcb:flush exwm--connection)
-              (unless exwm-workspace-minibuffer-position
+              (unless (exwm-workspace--minibuffer-own-frame-p)
                 ;; The frame needs to be recreated since it won't use the
                 ;; minibuffer on the new workspace.
                 (let* ((old-frame exwm--floating-frame)
@@ -567,7 +567,7 @@ This functions is modified from `display-buffer-reuse-window' and
       (xcb:+request exwm--connection
           (make-instance 'xcb:MapWindow :window (car i))))
     ;; Reparent out the minibuffer frame.
-    (when exwm-workspace-minibuffer-position
+    (when (exwm-workspace--minibuffer-own-frame-p)
       (xcb:+request exwm--connection
           (make-instance 'xcb:ReparentWindow
                          :window (frame-parameter exwm-workspace--minibuffer
@@ -614,13 +614,14 @@ This functions is modified from `display-buffer-reuse-window' and
       (setq exwm-workspace--minibuffer
             (make-frame '((window-system . x) (minibuffer . only)
                           (left . 10000) (right . 10000)
-                          (width . 0) (height . 0)))
-            default-minibuffer-frame exwm-workspace--minibuffer)
+                          (width . 0) (height . 0))))
       ;; Remove/hide existing frames.
       (dolist (f old-frames)
         (if (frame-parameter f 'client)
             (make-frame-invisible f)
           (delete-frame f))))
+    ;; This is the only usable minibuffer frame.
+    (setq default-minibuffer-frame exwm-workspace--minibuffer)
     (let ((outer-id (string-to-number
                      (frame-parameter exwm-workspace--minibuffer
                                       'outer-window-id)))