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

@ -35,7 +35,7 @@ corresponding buffer.")
(defun exwm-manage--update-geometry (id &optional force)
"Update window geometry."
(exwm--with-current-id id
(with-current-buffer (exwm--id->buffer id)
(unless (and exwm--geometry (not force))
(let ((reply (xcb:+request-unchecked+reply exwm--connection
(make-instance 'xcb:GetGeometry :drawable id))))
@ -137,7 +137,7 @@ corresponding buffer.")
(exwm-input-grab-keyboard id)
(exwm-workspace--update-switch-history)
(setq exwm-input--focus-lock nil) ;unlocked in advance
(exwm--with-current-id id
(with-current-buffer (exwm--id->buffer id)
(run-hooks 'exwm-manage-finish-hook))))
(setq exwm-input--focus-lock nil))