From 2d4104a0eceb7d043ed1cd6bdd1bda1db4f91a73 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Mon, 10 Aug 2015 10:55:28 +0800 Subject: 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. --- exwm-floating.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'exwm-floating.el') diff --git a/exwm-floating.el b/exwm-floating.el index 3e9cade15a..bc7ee33846 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 -- cgit 1.4.1