about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 04493764bd..12390b0ea2 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -67,7 +67,10 @@
               exwm-workspace--current)))
          (original-id (frame-parameter original-frame 'exwm-window-id))
          ;; Create new frame
-         (frame (with-current-buffer "*scratch*"
+         (frame (with-current-buffer
+                    (or (get-buffer "*scratch*")
+                        (prog1 (get-buffer-create "*scratch*")
+                          (set-buffer-major-mode "*scratch*")))
                   (prog2
                       (exwm--lock)
                       (make-frame