unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Brendan Miller <catphive@catphive.net>
Cc: 9982@debbugs.gnu.org
Subject: bug#9982: Theme faces wrongly applied after background changes.
Date: Mon, 26 Dec 2011 16:19:49 +0100	[thread overview]
Message-ID: <CFE1B909-8F8C-46B4-8EE0-93E907CAAAE3@swipnet.se> (raw)
In-Reply-To: <E09627ED-91B4-40FB-B313-BF825C641829@swipnet.se>

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ärv:

> Hello.
> 
> 
> 8 nov 2011 kl. 08:38 skrev Brendan Miller:
> 
>> 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.
>> 
>> http://www.zimagez.com/zimage/screenshot-11072011-113329pm.php
>> 
> 
> Upon further investigation, this is not a Gtk+ problem, it happend for lucid also.
> But just for the first set-background-color call.
> 
> There seems to be some error in the face/frame interaction.  This is what happens for me:
> 
> (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")
> 
> 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.
> 
> I don't know why this is only seen with XFCE and just for the first set-background-color call.
> 
> 	Jan D.
> 
> 






  reply	other threads:[~2011-12-26 15:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07  2:33 bug#9982: M-x load-theme does not change background color Brendan Miller
2011-11-07 17:46 ` Glenn Morris
2011-11-07 19:55   ` Brendan Miller
2011-11-07 20:29     ` Glenn Morris
2011-11-08  2:01     ` Stefan Monnier
2011-11-08  5:51       ` Brendan Miller
2011-11-08  6:36         ` Eli Zaretskii
2011-11-08  7:38           ` Brendan Miller
2011-11-08  8:24             ` Eli Zaretskii
2011-11-08  8:34               ` Brendan Miller
2011-11-08  8:44                 ` Eli Zaretskii
2011-11-21 19:05             ` Jan Djärv
2011-12-11 13:17             ` Jan Djärv
2011-12-26 15:19               ` Jan Djärv [this message]
2012-01-29 11:08                 ` bug#9982: Theme faces wrongly applied after background changes Chong Yidong
2012-01-29 13:28                   ` Chong Yidong
2012-01-29 14:14                     ` Chong Yidong
2012-01-29 15:22                       ` Jan Djärv
2012-01-29 15:02                     ` Jan Djärv
2012-01-31  8:41                       ` Chong Yidong
2011-11-09  8:18         ` bug#9982: M-x load-theme does not change background color Jan Djärv
     [not found]   ` <mailman.2069.1320695773.15868.bug-gnu-emacs@gnu.org>
2011-11-07 20:09     ` Daimrod

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CFE1B909-8F8C-46B4-8EE0-93E907CAAAE3@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=9982@debbugs.gnu.org \
    --cc=catphive@catphive.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).