From 048994c7948528630b5c13f56dd22a9b2972e09c Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Mon, 10 Aug 2015 14:23:37 +0800 Subject: 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. --- exwm-layout.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'exwm-layout.el') diff --git a/exwm-layout.el b/exwm-layout.el index 4ae4859a224f..5d056afeb505 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)) -- cgit 1.4.1