(let* ((bg-resource
(and window-system
(x-get-resource ".backgroundMode" "BackgroundMode")))
- (params (frame-parameters frame))
(bg-mode (cond (frame-background-mode)
((null window-system)
;; No way to determine this automatically (?).
(bg-resource
(intern (downcase bg-resource)))
((< (apply '+ (x-color-values
- (cdr (assq 'background-color
- params))
+ (frame-parameter frame 'background-color)
frame))
;; Just looking at the screen, colors whose
;; values add up to .6 of the white total