diff --git a/exwm-manage.el b/exwm-manage.el index 2b96475..d61a55a 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -405,11 +405,12 @@ manager is shutting down." (xcb:flush exwm--connection)) (let ((kill-buffer-func (lambda (buffer) - (let ((kill-buffer-query-functions nil)) - (when exwm--floating-frame - (select-window - (frame-selected-window exwm-workspace--current))) - (kill-buffer buffer))))) + (when (buffer-local-value 'exwm--floating-frame buffer) + (select-window + (frame-selected-window exwm-workspace--current))) + (with-current-buffer buffer + (let ((kill-buffer-query-functions nil)) + (kill-buffer buffer)))))) (exwm--defer 0 kill-buffer-func buffer) (when (active-minibuffer-window) (exit-minibuffer))))))