emacs-devel
[Top][All Lists]
Advanced

[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: Ken Manheimer
Subject: Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21
Date: Thu, 24 Aug 2006 10:20:06 -0400

On 8/24/06, Kim F. Storm <address@hidden> wrote:
"Ken Manheimer" <address@hidden> writes:

> as i think i suggested in a previous message, the solution i would
> prefer would be to have some way to qualify icons so that they get a
> solid cursor in their transparent areas, and the default would be to
> have it inactive.  eg, a qualifier for xpm, png, gif, and other
> transparent-capable images, like :solid-cursor:
>
> `:solid-cursor-shows BOOLEAN'
>       When true, the cursor will appear solid through the transparent
> regions of the image
>       when the cursor is situated on the image and the window is
> active.  The default is for
>       only the cursor border to show, whether or not the window is active.
>
> by having the default be off, then the disruption of oversize blinking
> icons will be avoided.

Below is a patch which adds a new image :cursor property where you can
specify the actual type of cursor to show on the image in the selected
window (that is more flexible than your suggestion, and just as easy
to do).

yay!

Due to limitations in what cursors can be displayed for an image (bar
and hbar both gives a solid box??), it only works to set it to
box, hollow, and t (which means use whatever cursor-type is in the
buffer).


As an additional part of the patch, it only changes the cursor
from box to hollow for images which as greater than 4 times the
frame's default font size i.e. small images will behave like
normal glyphs with respect to the box cursor.

We can use either or both methods -- WDYT ?

if i'm understanding correctly, i think either or both methods will
satisfy my needs - thanks!

i'm not clear how the two interact - will the :cursor setting only
affect glyphs larger than 4 times the frame's default font size?  or
does it mean that glyphs will have particular cursors if they either
are 4 times the size or if they have an explicit :cursor display
setting?  my concern is settled either way, but the documentation may
be complex if there's no simple answer.

i also wonder whether it will be confusing to have the option for
graphics formats that don't support transparency, but have no strong
opinions about this.

i agree w/david about making the scaling threshold a parameter.  that
could actually help with documentation by providing an artifact that's
conveys some of the explanation.  i would lean towards a scaling
factor rather than absolute pixels/points, but haven't thought that
through.

by the way, i (eagerly) applied your patch by hand, but am unable to
compile - i'm getting complaints about QCursor being undeclared:

xdisp.c: In function `get_window_cursor_type':
xdisp.c:21219: error: `QCcursor' undeclared (first use in this function)
xdisp.c:21219: error: (Each undeclared identifier is reported only once
xdisp.c:21219: error: for each function it appears in.)
xdisp.c: In function `syms_of_xdisp':
xdisp.c:23733: error: `QCcursor' undeclared (first use in this function)

did i miss something, or is there more to the patch?

ken

*** xdisp.c     22 Aug 2006 23:28:12 +0200      1.1113
--- xdisp.c     24 Aug 2006 13:12:33 +0200
***************
*** 367,373 ****
  Lisp_Object Qimage;
[...]

--
ken
address@hidden
http://myriadicity.net




reply via email to

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