From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21 Date: Wed, 30 Aug 2006 10:09:27 +0200 Message-ID: References: <2cd46e7f0608181622w23c7d2b0h9b963deeadfd1c06@mail.gmail.com> <2cd46e7f0608191849g521593acm1f9dbc355315ffd6@mail.gmail.com> <2cd46e7f0608200810ge8885f7l7ffc88fd30a8a3eb@mail.gmail.com> <85zmdx2o5n.fsf@lola.goethe.zz> <2cd46e7f0608220645i4c9677d3mf778b3ded10dba07@mail.gmail.com> <87ac5px6cy.fsf@jurta.org> <87wt8sbhux.fsf@jurta.org> <87d5aj9ubd.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156925492 4445 80.91.229.2 (30 Aug 2006 08:11:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Aug 2006 08:11:32 +0000 (UTC) Cc: ken.manheimer@gmail.com, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 30 10:11:30 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GILAN-0006c2-Ke for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 10:11:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GILAM-00083n-T1 for ged-emacs-devel@m.gmane.org; Wed, 30 Aug 2006 04:11:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIL9y-0007yx-LC for emacs-devel@gnu.org; Wed, 30 Aug 2006 04:10:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIL9w-0007vu-PE for emacs-devel@gnu.org; Wed, 30 Aug 2006 04:10:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIL9w-0007vT-EO for emacs-devel@gnu.org; Wed, 30 Aug 2006 04:10:52 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GILJE-0006de-FF; Wed, 30 Aug 2006 04:20:28 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 315A4FAC08B; Wed, 30 Aug 2006 10:10:37 +0200 (CEST) Original-To: Juri Linkov In-Reply-To: <87d5aj9ubd.fsf@jurta.org> (Juri Linkov's message of "Tue, 29 Aug 2006 23:27:46 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59096 Archived-At: Juri Linkov writes: >> The only problem I see now with Kim's changes is that the box cursor >> on non-transparent images with no margin is not visible at all. >> >> If that is so, how about changing the cursor to a different type when >> that case occurs? It should be easy and will solve this problem. > > Changing the cursor to the hollow cursor on non-transparent images > will solve this problem. We already have this code to deal with cursor on non-transparent images: /* ... If the image doesn't have a mask, make a block cursor visible by drawing a rectangle around the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) { int r = s->img->relief; if (r < 0) r = -r; XDrawRectangle (s->display, s->window, s->gc, x - r, y - r, s->slice.width + r*2 - 1, s->slice.height + r*2 - 1); } The problem is that if there is no border (i.e. relief), it draws nothing. One fix would be to draw into the image. > >> Kim wrote: >> >> But there is still a visible difference when the cursor is on the image. >> >> What is that visible difference? > > I see no visible difference. Kim? I guess it is because I use a font size which is bigger than the image -- then I see the cursor in the background not occupied by the image. -- Kim F. Storm http://www.cua.dk