From 6eb122c8db9d6a445b2002f025e01215ab560843 Mon Sep 17 00:00:00 2001 From: Matt Bisson Date: Thu, 19 Sep 2019 08:48:43 +0200 Subject: [PATCH] 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 --- src/xterm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.39.5