mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-06 11:55:48 +00:00
Fixes: 19036
* nsfns.m (x_set_foreground_color, x_set_background_color) (x_set_cursor_color, Fxw_color_values): Block/unblock input, use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
This commit is contained in:
parent
f8c4f8d6a7
commit
6688117e79
@ -1,3 +1,9 @@
|
||||
2014-11-14 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* nsfns.m (x_set_foreground_color, x_set_background_color)
|
||||
(x_set_cursor_color, Fxw_color_values): Block/unblock input,
|
||||
use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
|
||||
|
||||
2014-11-09 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* fileio.c (Finsert_file_contents): Invalidate buffer caches also
|
||||
|
23
src/nsfns.m
23
src/nsfns.m
@ -282,9 +282,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
NSColor *col;
|
||||
EmacsCGFloat r, g, b, alpha;
|
||||
|
||||
/* Must block_input, because ns_lisp_to_color does block/unblock_input
|
||||
which means that col may be deallocated in its unblock_input if there
|
||||
is user input, unless we also block_input. */
|
||||
block_input ();
|
||||
if (ns_lisp_to_color (arg, &col))
|
||||
{
|
||||
store_frame_param (f, Qforeground_color, oldval);
|
||||
unblock_input ();
|
||||
error ("Unknown color");
|
||||
}
|
||||
|
||||
@ -301,8 +306,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
update_face_from_frame_parameter (f, Qforeground_color, arg);
|
||||
/*recompute_basic_faces (f); */
|
||||
if (FRAME_VISIBLE_P (f))
|
||||
redraw_frame (f);
|
||||
SET_FRAME_GARBAGED (f);
|
||||
}
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
|
||||
@ -314,9 +320,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
NSView *view = FRAME_NS_VIEW (f);
|
||||
EmacsCGFloat r, g, b, alpha;
|
||||
|
||||
block_input ();
|
||||
if (ns_lisp_to_color (arg, &col))
|
||||
{
|
||||
store_frame_param (f, Qbackground_color, oldval);
|
||||
unblock_input ();
|
||||
error ("Unknown color");
|
||||
}
|
||||
|
||||
@ -353,8 +361,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
}
|
||||
|
||||
if (FRAME_VISIBLE_P (f))
|
||||
redraw_frame (f);
|
||||
SET_FRAME_GARBAGED (f);
|
||||
}
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
|
||||
@ -363,9 +372,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
{
|
||||
NSColor *col;
|
||||
|
||||
block_input ();
|
||||
if (ns_lisp_to_color (arg, &col))
|
||||
{
|
||||
store_frame_param (f, Qcursor_color, oldval);
|
||||
unblock_input ();
|
||||
error ("Unknown color");
|
||||
}
|
||||
|
||||
@ -378,6 +389,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
x_update_cursor (f, 1);
|
||||
}
|
||||
update_face_from_frame_parameter (f, Qcursor_color, arg);
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
|
||||
@ -2298,11 +2310,16 @@ and GNUstep implementations ("distributor-specific release
|
||||
check_window_system (NULL);
|
||||
CHECK_STRING (color);
|
||||
|
||||
block_input ();
|
||||
if (ns_lisp_to_color (color, &col))
|
||||
return Qnil;
|
||||
{
|
||||
unblock_input ();
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
[[col colorUsingDefaultColorSpace]
|
||||
getRed: &red green: &green blue: &blue alpha: &alpha];
|
||||
unblock_input ();
|
||||
return list3i (lrint (red * 65280), lrint (green * 65280),
|
||||
lrint (blue * 65280));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user