# HG changeset patch # User Kenichi Handa # Date 1264920630 -32400 # Node ID 8bd26043ea93380237d379d96834db7ebda7bf4b # Parent fa65fbe23fdb24b00ee39541df8eb481b9586d87# Parent bb5cb7ece094e23282ea6de03a42203842be6810 from trunk diff -r fa65fbe23fdb -r 8bd26043ea93 src/ChangeLog --- a/src/ChangeLog Sun Jan 31 15:46:53 2010 +0900 +++ b/src/ChangeLog Sun Jan 31 15:50:30 2010 +0900 @@ -3,6 +3,11 @@ * font.c (font_parse_xlfd): If FONT is a font-entity and pixel size in NAME is invalid, return -1. +2010-01-31 Chong Yidong + + * nsterm.m (ns_defined_color): Block input. Suggested by Mike + (Bug#3605). + 2010-01-31 David De La Harpe Golden * fileio.c (Frename_file): Correctly rename symlinks to diff -r fa65fbe23fdb -r 8bd26043ea93 src/nsterm.m --- a/src/nsterm.m Sun Jan 31 15:46:53 2010 +0900 +++ b/src/nsterm.m Sun Jan 31 15:50:30 2010 +0900 @@ -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; }