From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6609: 23.2; Cursor becomes invisible when put over some faces Date: Mon, 12 Jul 2010 13:35:16 +0300 Message-ID: <838w5ht2cb.fsf@gnu.org> References: <83hbk6unnp.fsf@gnu.org> <83aapyum9c.fsf@gnu.org> <838w5iue9p.fsf@gnu.org> <8339vpvrld.fsf@gnu.org> <83tyo5u7mp.fsf@gnu.org> <83hbk5t9r7.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1278932457 2847 80.91.229.12 (12 Jul 2010 11:00:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Jul 2010 11:00:57 +0000 (UTC) Cc: 6609@debbugs.gnu.org To: Deniz Dogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 12 13:00:43 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OYGkc-0006RF-G8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Jul 2010 13:00:42 +0200 Original-Received: from localhost ([127.0.0.1]:53377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYGkZ-0001GC-Jr for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Jul 2010 07:00:39 -0400 Original-Received: from [140.186.70.92] (port=44576 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYGkD-000157-4E for bug-gnu-emacs@gnu.org; Mon, 12 Jul 2010 07:00:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYGk8-00014W-SQ for bug-gnu-emacs@gnu.org; Mon, 12 Jul 2010 07:00:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37359) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYGk8-00014M-QX for bug-gnu-emacs@gnu.org; Mon, 12 Jul 2010 07:00:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OYGOg-0006aw-H5; Mon, 12 Jul 2010 06:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Jul 2010 10:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6609-submit@debbugs.gnu.org id=B6609.127893107625332 (code B ref 6609); Mon, 12 Jul 2010 10:38:02 +0000 Original-Received: (at 6609) by debbugs.gnu.org; 12 Jul 2010 10:37:56 +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 1OYGOZ-0006aX-Mb for submit@debbugs.gnu.org; Mon, 12 Jul 2010 06:37:55 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYGOX-0006aS-6b for 6609@debbugs.gnu.org; Mon, 12 Jul 2010 06:37:54 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L5F00L00X886R00@a-mtaout22.012.net.il> for 6609@debbugs.gnu.org; Mon, 12 Jul 2010 13:37:17 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.120.144]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5F00JR8XI3GO40@a-mtaout22.012.net.il>; Mon, 12 Jul 2010 13:37:16 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 12 Jul 2010 06:38:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38442 Archived-At: > From: Deniz Dogan > Date: Mon, 12 Jul 2010 10:09:04 +0200 > Cc: 6609@debbugs.gnu.org >=20 > 2010/7/12 Eli Zaretskii : > >> From: Deniz Dogan > >> Date: Sun, 11 Jul 2010 21:49:12 +0200 > >> Cc: 6609@debbugs.gnu.org > >> > >> Terribly sorry about that. I did mean white foreground on black > >> background in the original report! > > > > A world of difference. =A0I do see this problem on XP as well, th= en. > > > > Can someone try this on GNU/Linux in a GUI session, please? =A0I'= d like > > to know if this problem is specific to w32. > > > > To repeat the recipe: > > > > =A0emacs -Q > > > > Insert this in the *scratch* buffer: > > > > =A0(set-background-color "black") > > =A0(set-foreground-color "white") > > > > Evaluate these two lines. =A0Your cursor will now become invisibl= e. =A0You > > can only see it (a) when it is on some text of a non-default colo= r, or > > (b) when the Emacs frame does not have focus, and the cursor is > > displayed as a hollow rectangle. > > > > "M-x set-face-background RET cursor RET white RET" fixes the prob= lem. > > So my first guess would be that we don't do that automatically as= part > > of changing the default face, for some reason. > > >=20 > I have tried this on GNU/Linux as well (Bazaar version from some ti= me > in June) and the problem does not appear there. I can't remember it > ever happening on GNU/Linux actually. Can you please try the patch below? If it works for you, I will commit it to the emacs-23 branch. =3D=3D=3D modified file 'src/w32fns.c' --- src/w32fns.c=092010-07-10 18:52:53 +0000 +++ src/w32fns.c=092010-07-12 10:31:49 +0000 @@ -1333,7 +1333,10 @@ x_set_foreground_color (struct frame *f, if (FRAME_W32_WINDOW (f) !=3D 0) { if (x->cursor_pixel =3D=3D old_fg) -=09x->cursor_pixel =3D fg; +=09{ +=09 x->cursor_pixel =3D fg; +=09 x->cursor_gc->background =3D fg; +=09} =20 update_face_from_frame_parameter (f, Qforeground_color, arg); if (FRAME_VISIBLE_P (f))