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.
This commit is contained in:
parent
d998b42b89
commit
d1806e9188
3 changed files with 45 additions and 43 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue