emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch to fix the Bar Cursor Too Narrow problem on Mac OS X


From: Chong Yidong
Subject: Re: Patch to fix the Bar Cursor Too Narrow problem on Mac OS X
Date: Wed, 23 Feb 2011 15:06:14 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Adrian Robert <address@hidden> 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 via email to

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