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-background.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'exwm-background.el') diff --git a/exwm-background.el b/exwm-background.el index e7a0360c97..f3e0d895c5 100644 --- a/exwm-background.el +++ b/exwm-background.el @@ -172,19 +172,17 @@ replace it.") (defun exwm-background--init () "Initialize background module." (exwm--log) - (add-hook 'enable-theme-functions 'exwm-background--update) (add-hook 'disable-theme-functions 'exwm-background--update) - (exwm-background--update)) (defun exwm-background--exit () "Uninitialize the background module." (exwm--log) - (remove-hook 'enable-theme-functions 'exwm-background--update) (remove-hook 'disable-theme-functions 'exwm-background--update) - (when exwm-background--connection + (when (and exwm-background--connection + (slot-value exwm-background--connection 'connected)) (xcb:disconnect exwm-background--connection)) (setq exwm-background--pixmap nil exwm-background--connection nil -- cgit 1.4.1