From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#9982: Theme faces wrongly applied after background changes. Date: Mon, 26 Dec 2011 16:19:49 +0100 Message-ID: References: <097h3b7rlx.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324912844 9591 80.91.229.12 (26 Dec 2011 15:20:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 26 Dec 2011 15:20:44 +0000 (UTC) Cc: 9982@debbugs.gnu.org To: Brendan Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 26 16:20:39 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RfCLu-0006DQ-VC for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Dec 2011 16:20:39 +0100 Original-Received: from localhost ([::1]:58064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfCLt-0007El-Ow for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Dec 2011 10:20:37 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:37390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfCLp-00075w-PT for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2011 10:20:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RfCLo-0007NE-3m for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2011 10:20:33 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfCLo-0007NA-2B for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2011 10:20:32 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RfCOD-0007Im-UO for bug-gnu-emacs@gnu.org; Mon, 26 Dec 2011 10:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Dec 2011 15:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9982 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9982-submit@debbugs.gnu.org id=B9982.132491294828028 (code B ref 9982); Mon, 26 Dec 2011 15:23:01 +0000 Original-Received: (at 9982) by debbugs.gnu.org; 26 Dec 2011 15:22:28 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RfCNg-0007I1-6Q for submit@debbugs.gnu.org; Mon, 26 Dec 2011 10:22:28 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RfCNd-0007Hr-2l for 9982@debbugs.gnu.org; Mon, 26 Dec 2011 10:22:26 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 4E0B79932 for <9982@debbugs.gnu.org>; Mon, 26 Dec 2011 16:19:50 +0100 (CET) Original-Received: (qmail 26261 invoked by uid 89); 26 Dec 2011 15:19:00 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 26 Dec 2011 15:19:00 -0000 Original-Received: from [172.20.199.14] (zeplinf [172.20.199.14]) by coolsville.localdomain (Postfix) with ESMTPSA id 65ED27FA058; Mon, 26 Dec 2011 16:19:49 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 26 Dec 2011 10:23:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55205 Archived-At: Hello. I investigated further. In the face-spec-recalc one does this: (let ((theme-faces (reverse (get face-sym 'theme-face)))) (dolist (spec theme-faces) (face-spec-set-2 face frame (cadr spec)))) The problem is that for the default face we have set the background to = black, but the theme variant of default is still white, so the = background is painted white. Then the redisplay happens, and the parts with text have black = background, but other parts still have white. I guess this only happens = in XFCE due to a race condition. The complete theme face is: ((user ((t (:inherit nil :stipple nil :background "white" :foreground = "black" :inverse-video nil :box nil :strike-through nil :overline nil = :underline nil :slant normal :weight normal :height 98 :width normal = :foundry "unknown" :family "DejaVu Sans Mono"))))) I don't know where this theme face comes from, I haven' set any theme. = But it still gets applied after the background color has been changed. Can someone in that knows about faces and themes check this? Thanks, Jan D. 11 dec 2011 kl. 14:17 skrev Jan Dj=E4rv: > Hello. >=20 >=20 > 8 nov 2011 kl. 08:38 skrev Brendan Miller: >=20 >> Here's a screenshot of what (set-background-color "black") does the >> first time I execute it. Toggling between white and black a few times >> can get it into other states. >>=20 >> http://www.zimagez.com/zimage/screenshot-11072011-113329pm.php >>=20 >=20 > Upon further investigation, this is not a Gtk+ problem, it happend for = lucid also. > But just for the first set-background-color call. >=20 > There seems to be some error in the face/frame interaction. This is = what happens for me: >=20 > (set-background-color "black") > (set-frame-parameter "background" "black") > ... > x_set_background_color ("black") > update_face_from_frame_parameter (f, Qbackground_color, arg); > ... > (frame-set-background-mode) > ... > (face-spec-recalc) > ... > (set-frame-parameter "background" "white") >=20 > So the background is first black and then white again. It seems that = redisplay uses the GC with background black, but as the window = background is white, those parts not redrawn (i.e. without text) are = white. >=20 > I don't know why this is only seen with XFCE and just for the first = set-background-color call. >=20 > Jan D. >=20 >=20