diff --git a/exwm-background.el b/exwm-background.el index 6336e2b..e4bebc5 100644 --- a/exwm-background.el +++ b/exwm-background.el @@ -34,6 +34,8 @@ (require 'exwm-core) +(defvar exwm-background-mode) + (defcustom exwm-background-color nil "Background color for Xorg." :type '(choice @@ -43,7 +45,7 @@ :initialize #'custom-initialize-default :set (lambda (symbol value) (set-default-toplevel-value symbol value) - (when (bound-and-true-p exwm-background-mode) (exwm-background--update)))) + (when exwm-background-mode (exwm-background--update)))) (defconst exwm-background--properties '("_XROOTPMAP_ID" "_XSETROOT_ID" "ESETROOT_PMAP_ID") "The background properties to set. diff --git a/exwm-systemtray.el b/exwm-systemtray.el index a42b2b5..1a6507e 100644 --- a/exwm-systemtray.el +++ b/exwm-systemtray.el @@ -40,6 +40,8 @@ (declare-function exwm-workspace--workarea "exwm-workspace.el" (frame)) +(defvar exwm-systemtray-mode) + (defclass exwm-systemtray--icon () ((width :initarg :width) (height :initarg :height) @@ -87,7 +89,7 @@ TrueColor-24\" can be used to force Emacs to use 24-bit depth." using 32-bit depth. Using `workspace-background' instead.") (setq value 'workspace-background)) (set-default symbol value) - (when (and (bound-and-true-p exwm-systemtray-mode) + (when (and exwm-systemtray-mode exwm-systemtray--connection exwm-systemtray--embedder-window) ;; Change the background color for embedder. diff --git a/exwm-xsettings.el b/exwm-xsettings.el index ddc3d71..e438474 100644 --- a/exwm-xsettings.el +++ b/exwm-xsettings.el @@ -57,6 +57,7 @@ (defvar exwm-xsettings--XSETTINGS_S0-atom nil) (defvar exwm-xsettings--selection-owner-window nil) (defvar exwm-xsettings--serial 0) +(defvar exwm-xsettings-mode) (defun exwm-xsettings--rgba-match (_widget value) "Return t if VALUE is a valid RGBA color." @@ -67,7 +68,7 @@ SYMBOL is the setting being updated and VALUE is the new value." (set-default-toplevel-value symbol value) - (when (bound-and-true-p exwm-xsettings-mode) + (when exwm-xsettings-mode (exwm-xsettings--update-settings))) (defgroup exwm-xsettings nil