* MAC OS X Bar Cursor Width Question
@ 2011-02-12 9:22 Ben Key
2011-02-12 14:56 ` Adrian Robert
0 siblings, 1 reply; 2+ messages in thread
From: Ben Key @ 2011-02-12 9:22 UTC (permalink / raw)
To: Emacs-devel
[-- 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: 2154 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-12 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-12 9:22 MAC OS X Bar Cursor Width Question Ben Key
2011-02-12 14:56 ` Adrian Robert
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).