From: Po Lu Date: Thu, 24 Feb 2022 03:58:41 +0000 (+0800) Subject: Set border colors through the toolkit X-Git-Tag: emacs-29.0.90~2126 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec1aaac5c0fb621461a171bb241d2e1c74509d1e;p=emacs.git Set border colors through the toolkit * src/xfns.c (x_set_border_pixel): Set colors through Xt to avoid some problems. --- diff --git a/src/xfns.c b/src/xfns.c index 977096c13c6..03adb5ab8d7 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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 ();