aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2010-01-31 00:23:09 -0500
committerChong Yidong2010-01-31 00:23:09 -0500
commitc67d885b46ca59cc8fa5b2f38c5d84dcea2223bc (patch)
tree5b2049cea385b3a4fff89b22f3d9f4caf29e013f /src
parent8fab23622f08c0ecc404b1c12ef9834eda4a7bb3 (diff)
downloademacs-c67d885b46ca59cc8fa5b2f38c5d84dcea2223bc.tar.gz
emacs-c67d885b46ca59cc8fa5b2f38c5d84dcea2223bc.zip
* nsterm.m (ns_defined_color): Block input. Suggested by Mike
<deactivated@gmail.com> (Bug#3605).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsterm.m20
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 @@
12010-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
12010-01-31 David De La Harpe Golden <david@harpegolden.net> 62010-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