aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Bisson2019-09-19 08:48:43 +0200
committerMartin Rudalics2019-09-19 08:48:43 +0200
commit6eb122c8db9d6a445b2002f025e01215ab560843 (patch)
tree9e0c194d6b823530eeea58ac92a9ecc08cd366ad /src
parent79a01866a01754b9f566af76ef96e80cd90d094b (diff)
downloademacs-6eb122c8db9d6a445b2002f025e01215ab560843.tar.gz
emacs-6eb122c8db9d6a445b2002f025e01215ab560843.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c6
1 files 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)
6087 XtSetArg (av[ac], XmNincrement, 1); ++ac; 6087 XtSetArg (av[ac], XmNincrement, 1); ++ac;
6088 XtSetArg (av[ac], XmNpageIncrement, 1); ++ac; 6088 XtSetArg (av[ac], XmNpageIncrement, 1); ++ac;
6089 6089
6090 /* Note: "background" is the thumb color, and "trough" is the color behind
6091 everything. */
6090 pixel = f->output_data.x->scroll_bar_foreground_pixel; 6092 pixel = f->output_data.x->scroll_bar_foreground_pixel;
6091 if (pixel != -1) 6093 if (pixel != -1)
6092 { 6094 {
6093 XtSetArg (av[ac], XmNforeground, pixel); 6095 XtSetArg (av[ac], XmNbackground, pixel);
6094 ++ac; 6096 ++ac;
6095 } 6097 }
6096 6098
6097 pixel = f->output_data.x->scroll_bar_background_pixel; 6099 pixel = f->output_data.x->scroll_bar_background_pixel;
6098 if (pixel != -1) 6100 if (pixel != -1)
6099 { 6101 {
6100 XtSetArg (av[ac], XmNbackground, pixel); 6102 XtSetArg (av[ac], XmNtroughColor, pixel);
6101 ++ac; 6103 ++ac;
6102 } 6104 }
6103 6105