From: storm@cua.dk (Kim F. Storm)
Cc: Ken Manheimer <ken.manheimer@gmail.com>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: cursor doesn't show through transparent images in emacs 22, unlike emacs 21
Date: Fri, 25 Aug 2006 15:48:26 +0200 [thread overview]
Message-ID: <m31wr5gc45.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <85hd02nyjx.fsf@lola.goethe.zz> (David Kastrup's message of "Thu, 24 Aug 2006 13:49:38 +0200")
David Kastrup <dak@gnu.org> writes:
> I don't like the hardwired factor of 4: after all, nothing like this
> will be applied if you use large fonts. I think we should try to make
> characters and images behave comparably. Having a general size
> limitation variable available for block cursors, whether we are
> talking images or characters, would be more consistent.
>
> This size limitation could be specified as either float (multiple of
> default font size) or integer (pixels? Or 10ths of points?).
What about the simpler approach in the patch below?
It simply uses a hollow cursor if the image size is > WxH where WxH is
max(32, default width|height), i.e. block cursor is used on all images
<= 32x32 and possibly larger images if the default font size is larger
than that.
It is not customizable, but I suppose it will give satifying results
for most practical uses.
>
> Of course, if an image has no transparency, we probably need to use a
> box cursor, anyway.
Did you mean hollow cursor?
*** xdisp.c 24 Aug 2006 22:38:58 +0200 1.1114
--- xdisp.c 25 Aug 2006 15:38:42 +0200
***************
*** 21213,21221 ****
/* Use normal cursor if not blinked off. */
if (!w->cursor_off_p)
{
! if (glyph != NULL && glyph->type == IMAGE_GLYPH) {
! if (cursor_type == FILLED_BOX_CURSOR)
! cursor_type = HOLLOW_BOX_CURSOR;
}
return cursor_type;
}
--- 21213,21233 ----
/* Use normal cursor if not blinked off. */
if (!w->cursor_off_p)
{
! if (glyph != NULL && glyph->type == IMAGE_GLYPH
! && cursor_type == FILLED_BOX_CURSOR) {
! /* Using a block cursor on large images can be very annoying.
! So use a hollow cursor for "large" images. */
! struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id);
! if (img != NULL && IMAGEP (img->spec))
! {
! /* Arbitrarily, interpret "Large" as >32x32 and >NxN
! where N = size of default frame font size.
! This should cover most of the "tiny" icons people may use. */
!
! if (img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
! || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w)))
! cursor_type = HOLLOW_BOX_CURSOR;
! }
}
return cursor_type;
}
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2006-08-25 13:48 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 23:22 cursor doesn't show through transparent images in emacs 22, unlike emacs 21 Ken Manheimer
2006-08-18 23:33 ` Drew Adams
2006-08-19 17:49 ` Ken Manheimer
2006-08-19 23:09 ` Kim F. Storm
2006-08-20 1:49 ` Ken Manheimer
2006-08-20 5:00 ` Ken Manheimer
2006-08-20 6:42 ` David Kastrup
2006-08-20 12:05 ` Richard Stallman
2006-08-20 15:10 ` Ken Manheimer
2006-08-20 17:27 ` David Kastrup
2006-08-22 3:09 ` Richard Stallman
2006-08-22 8:03 ` David Kastrup
2006-08-22 13:45 ` Ken Manheimer
2006-08-24 11:31 ` Kim F. Storm
2006-08-24 11:49 ` David Kastrup
2006-08-25 13:48 ` Kim F. Storm [this message]
2006-08-24 14:20 ` Ken Manheimer
2006-08-24 14:26 ` Kim F. Storm
2006-08-24 15:53 ` Ken Manheimer
2006-08-24 19:56 ` Kim F. Storm
2006-08-24 21:41 ` Ken Manheimer
2006-08-25 14:28 ` Kim F. Storm
2006-08-25 15:24 ` Ken Manheimer
2006-08-26 10:08 ` Richard Stallman
2006-08-25 20:23 ` Richard Stallman
2006-08-25 22:35 ` Kim F. Storm
2006-08-26 12:22 ` Richard Stallman
2006-08-26 21:37 ` Kim F. Storm
2006-08-27 14:34 ` Richard Stallman
2006-08-27 20:37 ` Ken Manheimer
2006-08-27 21:45 ` Kim F. Storm
2006-08-28 22:10 ` Richard Stallman
2006-08-28 22:27 ` Ken Manheimer
2006-08-29 17:18 ` Richard Stallman
2006-08-28 22:33 ` Kim F. Storm
2006-08-27 20:42 ` Juri Linkov
2006-08-27 22:24 ` Kim F. Storm
2006-08-28 21:27 ` Juri Linkov
2006-08-28 22:09 ` Richard Stallman
2006-08-28 22:44 ` Juri Linkov
2006-08-28 23:02 ` Kim F. Storm
2006-08-29 21:31 ` Ken Manheimer
2006-08-29 21:36 ` David Kastrup
2006-08-29 22:12 ` Ken Manheimer
2006-08-30 17:58 ` Richard Stallman
2006-08-30 18:20 ` Ken Manheimer
2006-08-31 18:16 ` Richard Stallman
2006-09-01 15:46 ` Ken Manheimer
2006-08-29 17:18 ` Richard Stallman
2006-08-29 20:27 ` Juri Linkov
2006-08-30 8:09 ` Kim F. Storm
2006-08-31 7:33 ` Richard Stallman
2006-08-27 22:23 ` Kim F. Storm
2006-08-28 22:10 ` Richard Stallman
2006-08-25 23:01 ` Ken Manheimer
2006-08-26 12:22 ` Richard Stallman
2006-08-22 13:19 ` Ken Manheimer
2006-08-20 9:03 ` Jason Rumney
2006-08-20 9:09 ` David Kastrup
2006-08-20 12:05 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2006-09-02 18:08 (no subject) Richard Stallman
2006-09-03 21:30 ` cursor doesn't show through transparent images in emacs 22, unlike emacs 21 Kim F. Storm
2006-09-04 17:17 ` Richard Stallman
2006-09-04 22:42 ` Kim F. Storm
2006-09-06 8:49 ` Richard Stallman
2006-09-06 9:15 ` David Kastrup
2006-09-06 10:00 ` Kim F. Storm
2006-09-06 16:12 ` Ken Manheimer
2006-09-07 6:54 ` Richard Stallman
2006-09-07 7:47 ` David Kastrup
2006-09-09 20:45 ` Richard Stallman
2006-09-09 22:55 ` David Kastrup
2006-09-10 0:21 ` Kim F. Storm
2006-09-10 13:04 ` Richard Stallman
2006-09-10 20:25 ` Kim F. Storm
2006-09-10 23:00 ` Robert J. Chassell
2006-09-11 5:32 ` tomas
2006-09-11 8:08 ` Kim F. Storm
2006-09-11 8:16 ` David Kastrup
2006-09-11 11:56 ` Robert J. Chassell
2006-09-11 12:51 ` Kim F. Storm
2006-09-11 14:40 ` Robert J. Chassell
2006-09-11 14:11 ` Richard Stallman
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=m31wr5gc45.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
--cc=ken.manheimer@gmail.com \
--cc=rms@gnu.org \
/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).