about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-10-26T04·38+0800
committerChris Feng <chris.w.feng@gmail.com>2015-10-26T04·38+0800
commitd05df51b0563b385da46384901c73daa073c28b9 (patch)
tree8bd92d6f60e2345e833185d4afb92d8876bf5d64 /exwm-layout.el
parente8bc51280dba18dc394e15dd544e70ad27176f82 (diff)
Fix problems introduced/exposed by last commit
* exwm-workspace.el (exwm-workspace-switch, exwm-workspace--on-focus-in):
  Use handle-switch-frame instead of exwm-workspace--switch-count to filter
  out events.

* exwm-workspace.el (exwm-workspace--init): Delay making workspaces
  fullscreen.

* exwm-workspace.el (exwm-workspace-move-window):
* exwm-floating.el (exwm-floating--set-floating):
* exwm-layout.el (exwm-layout--refresh):
  `set-buffer-major-mode` does not accept buffer names.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 1d11dbcdca07..ffe1f1d0c4fd 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -215,18 +215,19 @@
   "Refresh layout."
   (let ((frame (selected-frame))
         (placeholder (or (get-buffer "*scratch*")
-                         (prog1 (get-buffer-create "*scratch*")
-                           (set-buffer-major-mode "*scratch*"))))
+                         (progn
+                           (set-buffer-major-mode
+                            (get-buffer-create "*scratch*"))
+                           (get-buffer "*scratch*"))))
         windows)
     (if (not (memq frame exwm-workspace--list))
         (if (frame-parameter frame 'exwm-window-id)
             ;; Refresh a floating frame
-            (progn
-              (when (eq major-mode 'exwm-mode)
-                (let ((window (frame-first-window frame)))
-                  (with-current-buffer (window-buffer window)
-                    (exwm--log "Refresh floating window #x%x" exwm--id)
-                    (exwm-layout--show exwm--id window)))))
+            (when (eq major-mode 'exwm-mode)
+              (let ((window (frame-first-window frame)))
+                (with-current-buffer (window-buffer window)
+                  (exwm--log "Refresh floating window #x%x" exwm--id)
+                  (exwm-layout--show exwm--id window))))
           ;; Other frames (e.g. terminal/graphical frame of emacsclient)
           ;; We shall bury all `exwm-mode' buffers in this case
           (unless placeholder ;create the *scratch* buffer if it's killed