all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Adrian Robert <Adrian.B.Robert@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Patch to fix the Bar Cursor Too Narrow problem on Mac OS X
Date: Wed, 23 Feb 2011 15:06:14 -0500	[thread overview]
Message-ID: <8762saiki1.fsf@stupidchicken.com> (raw)
In-Reply-To: <loom.20110222T131430-443@post.gmane.org> (Adrian Robert's message of "Tue, 22 Feb 2011 13:09:58 +0000 (UTC)")

Adrian Robert <Adrian.B.Robert@gmail.com> writes:

> OK, I'll bite on this since it's my code originally.  :-) I
> deliberately chose not to break into subfunctions like X since the
> clarity of having the whole implementation in one block seemed greater
> than that gained by splitting out.  Also a number of redundancies in
> x_draw_bar_cursor() and x_draw_hollow_cursor() are saved.

Nothing wrong with choosing not to break into subfunctions, but there
some differences in the basic logic that make it hard to maintain.

Consider the xterm behavior.  For FILLED_BOX_CURSOR, we call
draw_phys_cursor_glyph to redraw that glyph with the cursor face
(DRAW_CURSOR).  No additional repainting is necessary.  For bar cursors,
we paint an extra thin bar on top of the screen area for the existing
glyph; there is no need to call draw_phys_cursor_glyph.

In contrast, ns_draw_window_cursor repaints via NSRectFill (for both box
and bar cursors), and then calls draw_phys_cursor_glyph (for both box
and bar cursors).  The NS terminal seems not to use DRAW_CURSOR for
drawing filled box cursors.  So the basic handling for box cursors seems
to be completely different, and I don't understand the rationale.



  reply	other threads:[~2011-02-23 20:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18  4:29 Patch to fix the Bar Cursor Too Narrow problem on Mac OS X Ben Key
2011-02-19 19:15 ` Chong Yidong
2011-02-20  1:23   ` Ben Key
2011-02-21 17:40     ` Chong Yidong
2011-02-21 17:58     ` Chong Yidong
2011-02-21 21:15       ` Ben Key
2011-02-21 22:56         ` Ben Key
2011-02-22  0:23         ` Chong Yidong
2011-02-22  0:35           ` Chong Yidong
2011-02-22 13:09             ` Adrian Robert
2011-02-23 20:06               ` Chong Yidong [this message]
2011-02-24 12:38                 ` Jan Djärv
2011-02-23 20:45         ` Chong Yidong

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762saiki1.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=Adrian.B.Robert@gmail.com \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.