diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/nsterm.m | 20 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f27aed26bef..941c394f107 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * nsterm.m (ns_defined_color): Block input. Suggested by Mike | ||
| 4 | <deactivated@gmail.com> (Bug#3605). | ||
| 5 | |||
| 1 | 2010-01-31 David De La Harpe Golden <david@harpegolden.net> | 6 | 2010-01-31 David De La Harpe Golden <david@harpegolden.net> |
| 2 | 7 | ||
| 3 | * fileio.c (Frename_file): Correctly rename symlinks to | 8 | * fileio.c (Frename_file): Correctly rename symlinks to |
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, | |||
| 1552 | Return 0 if not found | 1552 | Return 0 if not found |
| 1553 | -------------------------------------------------------------------------- */ | 1553 | -------------------------------------------------------------------------- */ |
| 1554 | { | 1554 | { |
| 1555 | NSColor *temp; | 1555 | NSColor *col; |
| 1556 | int notFound = ns_get_color (name, &temp); | ||
| 1557 | |||
| 1558 | NSTRACE (ns_defined_color); | 1556 | NSTRACE (ns_defined_color); |
| 1559 | 1557 | ||
| 1560 | if (notFound) | 1558 | BLOCK_INPUT; |
| 1561 | return 0; | 1559 | if (ns_get_color (name, &col) != 0) /* Color not found */ |
| 1562 | 1560 | { | |
| 1561 | UNBLOCK_INPUT; | ||
| 1562 | return 0; | ||
| 1563 | } | ||
| 1563 | if (makeIndex && alloc) | 1564 | if (makeIndex && alloc) |
| 1564 | color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */ | 1565 | color_def->pixel = ns_index_color (col, f); |
| 1565 | 1566 | ns_query_color (col, color_def, !makeIndex); | |
| 1566 | ns_query_color (temp, color_def, !makeIndex); | 1567 | UNBLOCK_INPUT; |
| 1567 | |||
| 1568 | return 1; | 1568 | return 1; |
| 1569 | } | 1569 | } |
| 1570 | 1570 | ||