unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* MAC OS X Bar Cursor Width Question
@ 2011-02-11  5:01 Ben Key
  0 siblings, 0 replies; only message in thread
From: Ben Key @ 2011-02-11  5:01 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]

Hello,

I have a question about the bar cursor in Emacs on MAC OS X.  The first
thing I noticed when I configured Emacs to use the bar cursor on MAC OS X
was that the cursor seemed to be narrower that I expected, despite the fact
that when I configured Emacs to use the bar cursor I specified the width of
the cursor to be four pixels wide using the (bar . WIDTH) syntax.

While debugging this problem I found a couple of FIXME comments in
ns_draw_window_cursor along with the following line of code
    s.size.width = min (cursor_width, 2); //FIXME(see above)

The comments basically say that the cursor_width parameter is being ignored
because set_frame_cursor_types does not always initialize it.  When
investigating this further, I discovered that it is true that
set_frame_cursor_types does not always initialize the width (it is actually
get_specified_cursor_type that fails to initialize the width).

Note that as far as I can tell, when the (bar . WIDTH) syntax is used, the
cursor_width parameter is always initialized correctly.

My question is would it not be better to fix get_specified_cursor_type so
that the width is always initialized and then modify ns_draw_window_cursor
to honor the user specified cursor width than to always ignore the user's
desired cursor width?  This could be easily done by adding the line
    *width = 2;
near the top of get_specified_cursor_type.

Then the line in ns_draw_window_cursor could be changed to the following,
causing the user's selection when they use the (bar . WIDTH) syntax to be
honored.
    s.size.width = cursor_width;
Or, as an alternative, the line could be changed to the following:
      s.size.width = min (cursor_width, w->phys_cursor_width); //FIXME(see
above)

Would not this be a better thing to do?

I would appreciate any feedback you might have to offer on this question.

[-- Attachment #2: Type: text/html, Size: 1975 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-11  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11  5:01 MAC OS X Bar Cursor Width Question Ben Key

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).