[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cursor doesn't show through transparent images in emacs 22, unlike e

From: Kim F. Storm
Subject: Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21
Date: Wed, 30 Aug 2006 10:09:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Juri Linkov <address@hidden> 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

              /* ...        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 <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]