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-08-10T06·23+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-10T06·23+0800
commit048994c7948528630b5c13f56dd22a9b2972e09c (patch)
tree5c5732fde3c9a09bda4995a63c05c6e60f48120f /exwm-layout.el
parent2d4104a0eceb7d043ed1cd6bdd1bda1db4f91a73 (diff)
Remove redundant code caused by the concurrency of events (continued)
Remove `exwm--with-current-id`, which was introduced to as a wrapper to
`with-current-buffer` to do extra checks. Note that in functions run as hooks,
the validation of window ID is still required as they are not synchronized with
events.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 4ae4859a22..5d056afeb5 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -34,7 +34,9 @@
       (make-instance 'xcb:icccm:set-WM_STATE
                      :window id :state xcb:icccm:WM_STATE:NormalState
                      :icon xcb:Window:None))
-  (let* ((edges (or (exwm--with-current-id id exwm--floating-edges)
+  (let* ((buffer (exwm--id->buffer id))
+         (edges (or (and buffer
+                         (with-current-buffer buffer exwm--floating-edges))
                     (window-inside-pixel-edges window)))
          (x (elt edges 0))
          (y (elt edges 1))