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.
This commit is contained in:
Chris Feng 2015-08-10 14:23:37 +08:00
parent 2d4104a0ec
commit 048994c794
4 changed files with 34 additions and 37 deletions

View file

@ -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))