changeset 10598:8a07bcbe9130

(x-create-frame-with-faces): Assume cursor-color, mouse-color, and border-color are okay as specified unless they are the same as the new background color.
author Karl Heuer <kwzh@gnu.org>
date Mon, 30 Jan 1995 22:39:20 +0000
parents b357342180c2
children bbf3a30a4d39
files lisp/faces.el
diffstat 1 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Mon Jan 30 07:46:16 1995 +0000
+++ b/lisp/faces.el	Mon Jan 30 22:39:20 1995 +0000
@@ -928,17 +928,21 @@
 			   (if resource
 			       (cons nil (member (downcase resource)
 						 '("on" "true")))))))
-		(let ((params (frame-parameters frame)))
-		  (modify-frame-parameters
-		   frame
-		   (list (cons 'foreground-color (cdr (assq 'background-color params)))
-			 (cons 'background-color (cdr (assq 'foreground-color params)))
-			 (cons 'mouse-color (cdr (assq 'background-color params)))
-			 (cons 'border-color (cdr (assq 'background-color params)))))
-		  (modify-frame-parameters
-		   frame
-		   (list (cons 'cursor-color (cdr (assq 'background-color params)))))))
-
+		(let* ((params (frame-parameters frame))
+		       (bg (cdr (assq 'foreground-color params)))
+		       (fg (cdr (assq 'background-color params))))
+		  (modify-frame-parameters frame
+					   (list (cons 'foreground-color fg)
+						 (cons 'background-color bg)))
+		  (if (equal bg (cdr (assq 'border-color params)))
+		      (modify-frame-parameters frame
+					       (list (cons 'border-color fg))))
+		  (if (equal bg (cdr (assq 'mouse-color params)))
+		      (modify-frame-parameters frame
+					       (list (cons 'mouse-color fg))))
+		  (if (equal bg (cdr (assq 'cursor-color params)))
+		      (modify-frame-parameters frame
+					       (list (cons 'cursor-color fg))))))
 	    ;; Copy the vectors that represent the faces.
 	    ;; Also fill them in from X resources.
 	    (while rest