A better fix for bug#43886
* src/xfaces.c (load_color2, Fcolor_distance): Revert last change. * src/term.c (clear_tty_hooks): Don't clear defined_color_hook.
This commit is contained in:
parent
3196fd44c3
commit
c00606171f
2 changed files with 3 additions and 11 deletions
|
@ -3842,7 +3842,9 @@ clear_tty_hooks (struct terminal *terminal)
|
||||||
terminal->update_begin_hook = 0;
|
terminal->update_begin_hook = 0;
|
||||||
terminal->update_end_hook = 0;
|
terminal->update_end_hook = 0;
|
||||||
terminal->set_terminal_window_hook = 0;
|
terminal->set_terminal_window_hook = 0;
|
||||||
terminal->defined_color_hook = 0;
|
/* Don't clear the defined_color_hook, as that makes it impossible
|
||||||
|
to unload or load a theme when some TTY frame is suspended. */
|
||||||
|
/* terminal->defined_color_hook = 0; */
|
||||||
terminal->mouse_position_hook = 0;
|
terminal->mouse_position_hook = 0;
|
||||||
terminal->frame_rehighlight_hook = 0;
|
terminal->frame_rehighlight_hook = 0;
|
||||||
terminal->frame_raise_lower_hook = 0;
|
terminal->frame_raise_lower_hook = 0;
|
||||||
|
|
10
src/xfaces.c
10
src/xfaces.c
|
@ -1059,13 +1059,6 @@ static unsigned long
|
||||||
load_color2 (struct frame *f, struct face *face, Lisp_Object name,
|
load_color2 (struct frame *f, struct face *face, Lisp_Object name,
|
||||||
enum lface_attribute_index target_index, Emacs_Color *color)
|
enum lface_attribute_index target_index, Emacs_Color *color)
|
||||||
{
|
{
|
||||||
if (FRAME_TERMINAL (f)->defined_color_hook == NULL)
|
|
||||||
{
|
|
||||||
Lisp_Object frame;
|
|
||||||
XSETFRAME (frame, f);
|
|
||||||
signal_error ("Unable to load colors for suspended TTY frame", frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
eassert (STRINGP (name));
|
eassert (STRINGP (name));
|
||||||
eassert (target_index == LFACE_FOREGROUND_INDEX
|
eassert (target_index == LFACE_FOREGROUND_INDEX
|
||||||
|| target_index == LFACE_BACKGROUND_INDEX
|
|| target_index == LFACE_BACKGROUND_INDEX
|
||||||
|
@ -4398,9 +4391,6 @@ two lists of the form (RED GREEN BLUE) aforementioned. */)
|
||||||
struct frame *f = decode_live_frame (frame);
|
struct frame *f = decode_live_frame (frame);
|
||||||
Emacs_Color cdef1, cdef2;
|
Emacs_Color cdef1, cdef2;
|
||||||
|
|
||||||
if (FRAME_TERMINAL (f)->defined_color_hook == NULL)
|
|
||||||
signal_error ("Unable to validate colors for suspended TTY frame", frame);
|
|
||||||
|
|
||||||
if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
|
if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
|
||||||
&& !(STRINGP (color1)
|
&& !(STRINGP (color1)
|
||||||
&& FRAME_TERMINAL (f)->defined_color_hook (f,
|
&& FRAME_TERMINAL (f)->defined_color_hook (f,
|
||||||
|
|
Loading…
Add table
Reference in a new issue