From: Karl Heuer Date: Mon, 30 Jan 1995 22:39:20 +0000 (+0000) Subject: (x-create-frame-with-faces): Assume cursor-color, mouse-color, and X-Git-Tag: emacs-19.34~5260 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66cf1bd7bc531951ac1f68ad009215cb088f45cb;p=emacs.git (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. --- diff --git a/lisp/faces.el b/lisp/faces.el index 6ee8465b714..75b12fb03ec 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -928,17 +928,21 @@ selected frame." (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