diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-01-31 00:23:09 -0500 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-01-31 00:23:09 -0500 |
commit | c67d885b46ca59cc8fa5b2f38c5d84dcea2223bc (patch) | |
tree | 5b2049cea385b3a4fff89b22f3d9f4caf29e013f /src/nsterm.m | |
parent | 8fab23622f08c0ecc404b1c12ef9834eda4a7bb3 (diff) | |
download | emacs-c67d885b46ca59cc8fa5b2f38c5d84dcea2223bc.tar.gz |
* nsterm.m (ns_defined_color): Block input. Suggested by Mike
<deactivated@gmail.com> (Bug#3605).
Diffstat (limited to 'src/nsterm.m')
-rw-r--r-- | src/nsterm.m | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 3951fdc2e58..8f3233f9fde 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1552,19 +1552,19 @@ ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc, 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; } |