Fix ignored Motif scrollbar resources (Bug#37359)

* src/xterm.c (x_create_toolkit_scroll_bar): On Motif
scrollbars, "foreground" has no meaning, while "background"
means the truck and arrow colors, and "trough" means the
background of the entire widget.  This fix hooks up the Emacs
scrollbar "foreground" color to the XmNbackground resource
and the "background" color to XmNtroughColor which is more in
line with how Xaw scrollbars behave.

Copyright-paperwork-exempt: yes
This commit is contained in:
Matt Bisson 2019-09-19 08:48:43 +02:00 committed by Martin Rudalics
parent 79a01866a0
commit 6eb122c8db

View file

@ -6087,17 +6087,19 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
XtSetArg (av[ac], XmNincrement, 1); ++ac;
XtSetArg (av[ac], XmNpageIncrement, 1); ++ac;
/* Note: "background" is the thumb color, and "trough" is the color behind
everything. */
pixel = f->output_data.x->scroll_bar_foreground_pixel;
if (pixel != -1)
{
XtSetArg (av[ac], XmNforeground, pixel);
XtSetArg (av[ac], XmNbackground, pixel);
++ac;
}
pixel = f->output_data.x->scroll_bar_background_pixel;
if (pixel != -1)
{
XtSetArg (av[ac], XmNbackground, pixel);
XtSetArg (av[ac], XmNtroughColor, pixel);
++ac;
}