Mercurial > emacs
changeset 107062:bb5cb7ece094
* nsterm.m (ns_defined_color): Block input. Suggested by Mike
<deactivated@gmail.com> (Bug#3605).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 31 Jan 2010 00:23:09 -0500 |
parents | 56607edb3cea |
children | 8bd26043ea93 efefb2cc6775 |
files | src/ChangeLog src/nsterm.m |
diffstat | 2 files changed, 15 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Jan 30 23:49:28 2010 -0500 +++ b/src/ChangeLog Sun Jan 31 00:23:09 2010 -0500 @@ -1,3 +1,8 @@ +2010-01-31 Chong Yidong <cyd@stupidchicken.com> + + * nsterm.m (ns_defined_color): Block input. Suggested by Mike + <deactivated@gmail.com> (Bug#3605). + 2010-01-31 David De La Harpe Golden <david@harpegolden.net> * fileio.c (Frename_file): Correctly rename symlinks to
--- a/src/nsterm.m Sat Jan 30 23:49:28 2010 -0500 +++ b/src/nsterm.m Sun Jan 31 00:23:09 2010 -0500 @@ -1552,19 +1552,19 @@ Return 0 if not found -------------------------------------------------------------------------- */ { - NSColor *temp; - int notFound = ns_get_color (name, &temp); - + NSColor *col; NSTRACE (ns_defined_color); - if (notFound) - return 0; - + BLOCK_INPUT; + if (ns_get_color (name, &col) != 0) /* Color not found */ + { + UNBLOCK_INPUT; + return 0; + } if (makeIndex && alloc) - color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */ - - ns_query_color (temp, color_def, !makeIndex); - + color_def->pixel = ns_index_color (col, f); + ns_query_color (col, color_def, !makeIndex); + UNBLOCK_INPUT; return 1; }