]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix cursor color adjustment on Haiku
authorPo Lu <luangruo@yahoo.com>
Wed, 25 May 2022 02:17:46 +0000 (02:17 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 25 May 2022 02:18:00 +0000 (02:18 +0000)
* src/haikufns.c (haiku_set_foreground_color): Maybe set cursor
color correctly if it was equal to the old foreground color.

src/haikufns.c

index a08b43879e37d464a91a9d2e6abe6aa6af29fd2e..cf64eff702271a858449b8ab10c7358c21668d52 100644 (file)
@@ -639,14 +639,8 @@ haiku_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval
 
   if (FRAME_HAIKU_WINDOW (f))
     {
-
       if (output->cursor_color.pixel == old_fg)
-       {
-         output->cursor_color.pixel = old_fg;
-         output->cursor_color.red = RED_FROM_ULONG (old_fg);
-         output->cursor_color.green = GREEN_FROM_ULONG (old_fg);
-         output->cursor_color.blue = BLUE_FROM_ULONG (old_fg);
-       }
+       haiku_query_color (fg, &output->cursor_color);
 
       update_face_from_frame_parameter (f, Qforeground_color, arg);