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: Ben Key
Subject: Re: Patch to fix the Bar Cursor Too Narrow problem on Mac OS X
Date: Mon, 21 Feb 2011 16:56:43 -0600

My changes to xdisp.c are based on one simple premise that applies to all programming languages.  A function parameter or variable should not be used unless you can guarantee that it has been properly initialized to some sane value 100% of the time.  As the get_specified_cursor_type function is right now, the cursor_width parameter of ns_draw_window_cursor is only properly initialized some of the time.

My changes to
get_specified_cursor_type satisfy that requirement by initializing width to some sane value at the very beginning of the function that is used by the many possible code paths where the function previously returned without first bothering to initialize width.  The changes do not break any of the code paths where width is initialized to some other value before the function returns.

The simple fact is that my changes to
get_specified_cursor_type are absolutely required to guarantee that the cursor_width parameter of ns_draw_window_cursor is properly initialized to some sane value 100% of the time, especially if you use the latest version of my patch that uses the frame column width as the default value for width.


reply via email to

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