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-09-16T13·32+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-16T13·36+0800
commitb458d5ac30afed348df4788721bb48be94e97c60 (patch)
tree47a95d918c88d328fef4b67224abeb9b727d69ed /exwm-floating.el
parent576a676f1f0895bd473d54c2713ee9e2423023e6 (diff)
Allow showing buffers on other workspaces and moving an X window by switching
to its buffer

* exwm-workspace.el (exwm-workspace-show-all-buffers, exwm-workspace-switch)
  (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): Show buffers
  on other workspaces if `exwm-workspace-show-all-buffers' is non-nil.

* exwm-layout.el (exwm-layout-show-all-buffers, exwm-layout--refresh): Allow
  moving an X window by switch to its corresponding buffer from another
  workspace when `exwm-layout-show-all-buffers' is non-nil.
* exwm.el (exwm--ido-buffer-window-other-frame): Handle the case when
  `exwm-layout-show-all-buffers' is non-nil.

* exwm-floating.el (exwm-floating--set-floating): Handle the case when
  *scratch* buffer is killed.

* exwm-workspace.el (exwm-workspace-switch-to-buffer): Renamed from
  `exwm-workspace-switch-to-window' to better reflect its role.
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 04493764bd0f..12390b0ea2e1 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