changeset 12581:8e4a75fa4b5b

(x-create-frame-with-faces): Specify frame arg to x-color-values and frame-parameters. (set-face-background): Pass background-p arg to face-color-supported-p.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 Jul 1995 13:27:49 +0000
parents 03d3249e5d24
children 5f8972720e72
files lisp/faces.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Tue Jul 18 06:08:04 1995 +0000
+++ b/lisp/faces.el	Tue Jul 18 13:27:49 1995 +0000
@@ -150,7 +150,7 @@
   ;; For a specific frame, use gray stipple instead of gray color
   ;; if the display does not support a gray color.
   (if (and frame (not (eq frame t))
-	   (not (face-color-supported-p frame color)))
+	   (not (face-color-supported-p frame color t)))
       (set-face-stipple face face-default-stipple frame)
     (if (null frame)
 	(let ((frames (frame-list)))
@@ -1065,13 +1065,14 @@
     ;; on this frame.
     (let ((bg-resource (x-get-resource ".backgroundMode"
 				       "BackgroundMode"))
-	  (params (frame-parameters))
+	  (params (frame-parameters frame))
 	  (bg-mode))
       (setq bg-mode
 	    (cond (bg-resource (intern (downcase bg-resource)))
 		  ((< (apply '+ (x-color-values
-				 (cdr (assq 'background-color params))))
-		      (/ (apply '+ (x-color-values "white")) 3))
+				 (cdr (assq 'background-color params))
+				 frame))
+		      (/ (apply '+ (x-color-values "white" frame)) 3))
 		   'dark)
 		  (t 'light)))
       (modify-frame-parameters frame