]> git.eshelyaron.com Git - emacs.git/commitdiff
Set border colors through the toolkit
authorPo Lu <luangruo@yahoo.com>
Thu, 24 Feb 2022 03:58:41 +0000 (11:58 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 24 Feb 2022 03:58:41 +0000 (11:58 +0800)
* src/xfns.c (x_set_border_pixel): Set colors through Xt to
avoid some problems.

src/xfns.c

index 977096c13c6cbbfa1cc734822277953ea9fedb90..03adb5ab8d75291acf54e1cf5911f61148f09b36 100644 (file)
@@ -1472,6 +1472,21 @@ x_set_border_pixel (struct frame *f, unsigned long pix)
   unload_color (f, f->output_data.x->border_pixel);
   f->output_data.x->border_pixel = pix;
 
+#ifdef USE_X_TOOLKIT
+  if (f->output_data.x->widget && f->border_width > 0)
+    {
+      block_input ();
+      XtVaSetValues (f->output_data.x->widget, XtNborderColor,
+                    (Pixel) pix, NULL);
+      unblock_input ();
+
+      if (FRAME_VISIBLE_P (f))
+       redraw_frame (f);
+
+      return;
+    }
+#endif
+
   if (FRAME_X_WINDOW (f) != 0 && f->border_width > 0)
     {
       block_input ();