about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-10T02·55+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-10T02·55+0800
commit2d4104a0eceb7d043ed1cd6bdd1bda1db4f91a73 (patch)
treef5c4ff13d71d6d2a843e7478398822112cac272a /exwm-floating.el
parentedc70eb6616b818463c94b5ab8c9e3f1dfd177c9 (diff)
Fix emacsclient bugs
`emacsclient` started with `-c` or `-t` argument create a new frame that shall
not be used to manage X windows.
Also fix some related input focus issues (with some remaining unfixed).
Close #17.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 3e9cade15a9f..bc7ee338466b 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -53,12 +53,14 @@
          (original-id (frame-parameter original-frame 'exwm-window-id))
          ;; Create new frame
          (frame (with-current-buffer "*scratch*"
-                  (make-frame `((minibuffer . nil) ;use the one on workspace
-                                (background-color
-                                 . ,exwm-floating-border-color)
-                                (internal-border-width
-                                 . ,exwm-floating-border-width)
-                                (unsplittable . t))))) ;and fix the size later
+                  (prog2
+                      (exwm--lock)
+                      (make-frame
+                       `((minibuffer . nil) ;use the one on workspace
+                         (background-color . ,exwm-floating-border-color)
+                         (internal-border-width . ,exwm-floating-border-width)
+                         (unsplittable . t))) ;and fix the size later
+                    (exwm--unlock))))
          (frame-id (string-to-int (frame-parameter frame 'window-id)))
          (outer-id (string-to-int (frame-parameter frame 'outer-window-id)))
          (window (frame-first-window frame)) ;and it's the only window