diff --git a/exwm-systemtray.el b/exwm-systemtray.el index 4f02a78..9ad29ac 100644 --- a/exwm-systemtray.el +++ b/exwm-systemtray.el @@ -491,7 +491,9 @@ Argument DATA contains the raw event data." (cl-defun exwm-systemtray--init () "Initialize system tray module." (exwm--log) - (cl-assert (not exwm-systemtray--connection)) + ;; idempotent initialization + (when exwm-systemtray--connection + (cl-return-from exwm-systemtray--init)) (cl-assert (not exwm-systemtray--list)) (cl-assert (not exwm-systemtray--selection-owner-window)) (cl-assert (not exwm-systemtray--embedder-window)) diff --git a/exwm-xsettings.el b/exwm-xsettings.el index 242819f..985c273 100644 --- a/exwm-xsettings.el +++ b/exwm-xsettings.el @@ -238,7 +238,9 @@ SERIAL is a sequence number." "Initialize the XSETTINGS module." (exwm--log) - (cl-assert (not exwm-xsettings--connection)) + ;; idempotent initialization + (when exwm-xsettings--connection + (cl-return-from exwm-xsettings--init)) ;; Connect (setq exwm-xsettings--connection (xcb:connect))