From 7318f857f2937c421094d66d976d4e926feacc71 Mon Sep 17 00:00:00 2001 From: Adrián Medraño Calvo Date: Fri, 9 Jun 2023 00:00:00 +0000 Subject: Observe connection status on deinitialization * exwm-workspace.el (exwm-workspace--remove-frame-as-workspace): Add optional argument quit. * exwm-background.el (exwm-background--exit): * exwm-input.el (exwm-input--exit): * exwm-manage.el (exwm-manage--unmanage-window): * exwm-systemtray.el (exwm-systemtray--exit): * exwm-workspace.el (exwm-workspace--exit-minibuffer-frame) (exwm-workspace--exit): * exwm-xim.el (exwm-xim--exit): Observe connection status when deinitializing in order to support deinitializing when the connection breaks. --- exwm-xim.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'exwm-xim.el') diff --git a/exwm-xim.el b/exwm-xim.el index 9589648d22ca..ac530f38930a 100644 --- a/exwm-xim.el +++ b/exwm-xim.el @@ -754,10 +754,12 @@ Such event would be received when the client window is destroyed." ;; Close IMS communication connections. (mapc (lambda (i) (when (vectorp i) - (xcb:disconnect (elt i 0)))) + (when (slot-value (elt i 0) 'connected) + (xcb:disconnect (elt i 0))))) exwm-xim--server-client-plist) ;; Close the IMS connection. - (unless exwm-xim--conn + (unless (and exwm-xim--conn + (slot-value exwm-xim--conn 'connected)) (cl-return-from exwm-xim--exit)) ;; Remove exwm-xim from XIM_SERVERS. (let ((reply (xcb:+request-unchecked+reply exwm-xim--conn -- cgit 1.4.1