From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#43837: 28.0.50; [NS] Internal border of inactive frame loses color Date: Tue, 6 Oct 2020 21:37:15 +0100 Message-ID: <20201006203715.GD60347@breton.holly.idiocy.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="aM3YZ0Iwxop3KEKx" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15802"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43837@debbugs.gnu.org To: Andrii Kolomoiets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 06 22:38:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPtiw-0003zL-Dz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Oct 2020 22:38:14 +0200 Original-Received: from localhost ([::1]:58090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPtiv-00010b-Fg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Oct 2020 16:38:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPtik-0000xx-LT for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2020 16:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPtik-0003jo-Cm for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2020 16:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPtik-00010q-9x for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2020 16:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Oct 2020 20:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43837 X-GNU-PR-Package: emacs Original-Received: via spool by 43837-submit@debbugs.gnu.org id=B43837.16020166483841 (code B ref 43837); Tue, 06 Oct 2020 20:38:02 +0000 Original-Received: (at 43837) by debbugs.gnu.org; 6 Oct 2020 20:37:28 +0000 Original-Received: from localhost ([127.0.0.1]:54261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPtiC-0000zs-3q for submit@debbugs.gnu.org; Tue, 06 Oct 2020 16:37:28 -0400 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]:35978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPtiA-0000zT-AU for 43837@debbugs.gnu.org; Tue, 06 Oct 2020 16:37:27 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by wilbur.contactoffice.com (Postfix) with ESMTP id A590411D8; Tue, 6 Oct 2020 22:37:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1602016639; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=1988; bh=L3cP3uei9ZxmTJm9Tvyvf6w/az2neL2oNFarQCQn6z4=; b=msqRnOWcsuBzWMpjqx/jYaf+jZ9+bZcO7ubyRPvMk0R4wcuehGivf5Ps9fW/JIxA +kVv5793wjX/MQvCswnM/JO6jA6YC0MmwKzC+Vy0K6qLV9qOHnrBhkGT9yN1zHm/shu TzgOReo3ob6ikh4kamG/FP28NN73mM3P61/hbx4kWluBpyjh6LWJFw4uiPCXV8sc3Ob s0xnyTkvto9Kw0cUQZi538G9e8CzQ60Wo0MERtXCqXL8lzqqw5nBSYXVyRC1TJj40Ln LRLY8E1WWGj6K112oyK74m5RoCEWjTuLRzkbAS5tslsnjdlhUZ6/K38vGnMC7EiSEdw 1i5Zlv1/JQ== Original-Received: by smtp.mailfence.com with ESMTPA ; Tue, 6 Oct 2020 22:37:16 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id B3A682025E342F; Tue, 6 Oct 2020 21:37:15 +0100 (BST) Mail-Followup-To: Alan Third , Andrii Kolomoiets , 43837@debbugs.gnu.org Content-Disposition: inline In-Reply-To: X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189942 Archived-At: --aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Prevent-mixing-of-faces-from-different-frames-bug-43.patch" >From b5f0e5a1c508a950a13941e15fc4bd1c1a63bceb Mon Sep 17 00:00:00 2001 From: Alan Third 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 --aM3YZ0Iwxop3KEKx--