about summary refs log tree commit diff
path: root/exwm-background.el
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2023-06-09T00·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2023-06-09T00·00+0000
commit7318f857f2937c421094d66d976d4e926feacc71 (patch)
treec31bca18af26c52dbfd0bff40712d4e7a19b3d32 /exwm-background.el
parentcff02333e282c692aa685d57cc2b7c32419fffe2 (diff)
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.
Diffstat (limited to 'exwm-background.el')
-rw-r--r--exwm-background.el6
1 files changed, 2 insertions, 4 deletions
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