branch: externals/exwm
commit ebaa4aa9da29ff553c5b957516cfbc01730a1680
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
exwm-xsettings--pick-theme: Ensure that face background is defined
* exwm-xsettings.el (exwm-xsettings--pick-theme): Use exwm--find-x-frame
---
exwm-xsettings.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/exwm-xsettings.el b/exwm-xsettings.el
index 2d76a24513..7a37245c7c 100644
--- a/exwm-xsettings.el
+++ b/exwm-xsettings.el
@@ -132,10 +132,9 @@ the default face's background color."
(pcase theme
((cl-type string) theme)
(`(,(cl-type string) . ,(cl-type string))
- ;; The background color can be undefined for terminal Emacs. This only
- ;; happens rarely, e.g., when switching themes from a terminal frame, from
- ;; the same instance as EXWM.
- (if (ignore-errors (color-dark-p (color-name-to-rgb (face-background
'default))))
+ (if (color-dark-p
+ (color-name-to-rgb
+ (face-background 'default (exwm--find-x-frame))))
(cdr theme) (car theme)))
(_ (error "Expected theme to be a string or a pair of strings"))))