Respect `x-cursor-fore-pixel' on Haiku
* src/haikufns.c (haiku_set_cursor_color): Respect `x-cursor-fore-pixel'. (syms_of_haikufns): Declare variable `x-cursor-fore-pixel'.
This commit is contained in:
parent
e9217d0f34
commit
ab5b2e63fa
1 changed files with 16 additions and 1 deletions
|
@ -1393,7 +1393,7 @@ haiku_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
CHECK_STRING (arg);
|
||||
|
||||
block_input ();
|
||||
Emacs_Color color;
|
||||
Emacs_Color color, fore_pixel;
|
||||
|
||||
if (haiku_get_color (SSDATA (arg), &color))
|
||||
{
|
||||
|
@ -1403,6 +1403,17 @@ haiku_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
}
|
||||
|
||||
FRAME_CURSOR_COLOR (f) = color;
|
||||
|
||||
if (STRINGP (Vx_cursor_fore_pixel))
|
||||
{
|
||||
if (haiku_get_color (SSDATA (Vx_cursor_fore_pixel),
|
||||
&fore_pixel))
|
||||
error ("Bad color %s", Vx_cursor_fore_pixel);
|
||||
FRAME_OUTPUT_DATA (f)->cursor_fg = fore_pixel.pixel;
|
||||
}
|
||||
else
|
||||
FRAME_OUTPUT_DATA (f)->cursor_fg = FRAME_BACKGROUND_PIXEL (f);
|
||||
|
||||
if (FRAME_VISIBLE_P (f))
|
||||
{
|
||||
gui_update_cursor (f, 0);
|
||||
|
@ -2685,6 +2696,10 @@ syms_of_haikufns (void)
|
|||
doc: /* SKIP: real doc in xfns.c. */);
|
||||
Vx_max_tooltip_size = Fcons (make_fixnum (80), make_fixnum (40));
|
||||
|
||||
DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel,
|
||||
doc: /* SKIP: real doc in xfns.c. */);
|
||||
Vx_cursor_fore_pixel = Qnil;
|
||||
|
||||
#ifdef USE_BE_CAIRO
|
||||
DEFVAR_LISP ("cairo-version-string", Vcairo_version_string,
|
||||
doc: /* Version info for cairo. */);
|
||||
|
|
Loading…
Add table
Reference in a new issue