all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Andrii Kolomoiets <andreyk.mad@gmail.com>
Cc: 43837@debbugs.gnu.org
Subject: bug#43837: 28.0.50; [NS] Internal border of inactive frame loses color
Date: Tue, 6 Oct 2020 21:37:15 +0100	[thread overview]
Message-ID: <20201006203715.GD60347@breton.holly.idiocy.org> (raw)
In-Reply-To: <m21ribi1n2.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

On Tue, Oct 06, 2020 at 10:40:33PM +0300, Andrii Kolomoiets wrote:
> In 'emacs -Q':
> 
> 1. M-: (setq test-frame (make-frame '((left . 50) (top . 50))))
> 2. C-x 5 o
> 3. M-: (set-face-background 'internal-border "blue" test-frame)
> 4. M-: (modify-frame-parameters test-frame '((background-color . "black")))
> 
> Now (face-background 'internal-border test-frame) returns nil.
> If we skip step 2, then the internal border color remains.

This isn't an NS specific problem. Eli actually spotted the bug last
year and put in a FIXME.

I can't think of a good reason for the code to use the selected frame,
but perhaps I'm missing something.

Patch attached.
-- 
Alan Third

[-- Attachment #2: 0001-Prevent-mixing-of-faces-from-different-frames-bug-43.patch --]
[-- Type: text/plain, Size: 1294 bytes --]

From b5f0e5a1c508a950a13941e15fc4bd1c1a63bceb Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Tue, 6 Oct 2020 21:32:55 +0100
Subject: [PATCH] Prevent mixing of faces from different frames (bug#43837)

* lisp/frame.el (frame-set-background-mode): Use the face spec from
the frame that's the target of the function instead of the currently
selected frame.
---
 lisp/frame.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/frame.el b/lisp/frame.el
index 7751ae1303..26b23f8229 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1247,10 +1247,7 @@ frame-set-background-mode
                          (assq face (frame-face-alist))
                          (face-spec-match-p face
                                             (face-user-default-spec face)
-                                            ;; FIXME: why selected-frame and
-                                            ;; not the frame that is the
-                                            ;; argument to this function?
-                                            (selected-frame))))
+                                            frame)))
 		   (push face locally-modified-faces)))
 	    ;; Now change to the new frame parameters
 	    (modify-frame-parameters frame params)
-- 
2.26.1


  reply	other threads:[~2020-10-06 20:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 19:40 bug#43837: 28.0.50; [NS] Internal border of inactive frame loses color Andrii Kolomoiets
2020-10-06 20:37 ` Alan Third [this message]
2020-10-07  6:46   ` Andrii Kolomoiets
2020-10-07  7:19   ` Eli Zaretskii
2020-10-07  7:42     ` Andrii Kolomoiets
2020-10-07  8:27       ` Eli Zaretskii
2020-10-07  8:37         ` Eli Zaretskii
2020-10-07  8:45           ` Andrii Kolomoiets
2020-10-18 11:52             ` Stefan Kangas
2020-10-07  8:32     ` Alan Third
2020-10-07  7:03 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201006203715.GD60347@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=43837@debbugs.gnu.org \
    --cc=andreyk.mad@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.