From 6168bbca7e471447f84e3de1a9fa6fbabcc9a962 Mon Sep 17 00:00:00 2001 From: Matt Bisson Date: Mon, 9 Sep 2019 10:46:20 -0400 Subject: [PATCH] Fix ignored Motif scrollbar resources * 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 (bug#37359) I have hooked up the Emacs scrollbar "foreground" color to the XmNbackground resource, and the "background" color to XmNtroughColor. This is more in line with how Xaw scrollbars behave. --- src/xterm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 3cadf69380..70e45a964b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5925,17 +5925,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; } -- 2.23.0