From: Matt Bisson Date: Thu, 19 Sep 2019 06:48:43 +0000 (+0200) Subject: Fix ignored Motif scrollbar resources (Bug#37359) X-Git-Tag: emacs-27.0.90~1549 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6eb122c8db9d6a445b2002f025e01215ab560843;p=emacs.git 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 --- diff --git a/src/xterm.c b/src/xterm.c index b761eaf4d11..27d98003565 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; }