diff options
author | Philip <pipcet@gmail.com> | 2015-08-16T18·53+0000 |
---|---|---|
committer | Philip <pipcet@gmail.com> | 2015-08-17T07·45+0000 |
commit | d1806e91888cc2d56e252299d07cb6af05a3e9d0 (patch) | |
tree | 9315c2b8a78cb8e5bc687552fc9e74fa0799786d /exwm-manage.el | |
parent | d998b42b89bc9e248b6d2250c56ddd17ec4b17cf (diff) |
Improve code robustness.
* exwm-layout.el (exwm-layout-unset-fullscreen) (exwm-layout-set-fullscreen): Use `user-error' rather than `cl-assert'. * exwm-input.el (exwm-input--set-focus): Silently accept unknown ids. (exwm-input--grab-keyboard) (exwm-input--release-keyboard): Silently ignore calls for windows that have no buffer. * exwm-manage.el (exwm-manage--kill-client): Don't throw error when trying to kill a vanished window.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r-- | exwm-manage.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/exwm-manage.el b/exwm-manage.el index ffe21e23e7ad..3274d65c177a 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -260,10 +260,9 @@ corresponding buffer.") "Kill an X client." (interactive) (unless id (setq id (exwm--buffer->id (current-buffer)))) - (let ((pid (slot-value - (xcb:+request-unchecked+reply exwm--connection - (make-instance 'xcb:ewmh:get-_NET_WM_PID :window id)) - 'value))) + (let* ((response (xcb:+request-unchecked+reply exwm--connection + (make-instance 'xcb:ewmh:get-_NET_WM_PID :window id))) + (pid (and response (slot-value response 'value)))) (if pid (signal-process pid 'SIGKILL) (xcb:+request exwm--connection |