diff options
| author | Kenichi Handa | 2010-01-31 15:50:30 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-01-31 15:50:30 +0900 |
| commit | a1c65d578c777948efa42aa2132c6c96cf4026ab (patch) | |
| tree | b4a6d8bb75474ee5ea1dbaa1d20b69bbe378a85d /src | |
| parent | b57d9029b1e2cb5e74542046c79a6dde5c0620ad (diff) | |
| parent | c67d885b46ca59cc8fa5b2f38c5d84dcea2223bc (diff) | |
| download | emacs-a1c65d578c777948efa42aa2132c6c96cf4026ab.tar.gz emacs-a1c65d578c777948efa42aa2132c6c96cf4026ab.zip | |
from trunk
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 a614d670fba..34a7282d814 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,11 @@ | |||
| 3 | * font.c (font_parse_xlfd): If FONT is a font-entity and pixel | 3 | * font.c (font_parse_xlfd): If FONT is a font-entity and pixel |
| 4 | size in NAME is invalid, return -1. | 4 | size in NAME is invalid, return -1. |
| 5 | 5 | ||
| 6 | 2010-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 7 | |||
| 8 | * nsterm.m (ns_defined_color): Block input. Suggested by Mike | ||
| 9 | <deactivated@gmail.com> (Bug#3605). | ||
| 10 | |||
| 6 | 2010-01-31 David De La Harpe Golden <david@harpegolden.net> | 11 | 2010-01-31 David De La Harpe Golden <david@harpegolden.net> |
| 7 | 12 | ||
| 8 | * fileio.c (Frename_file): Correctly rename symlinks to | 13 | * 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 | ||