GNU bug report logs - #37359
[PATCH] Fix ignored Motif scrollbar resources.

Previous Next

Package: emacs;

Reported by: Matt Bisson <mbisson <at> ccs.neu.edu>

Date: Mon, 9 Sep 2019 18:30:02 UTC

Severity: normal

Tags: patch

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: 37359 <at> debbugs.gnu.org
Subject: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 9 Sep 2019 14:27:07 -0400 (EDT)
[Message part 1 (text/plain, inline)]
Hi Emacs maintainers,

I noticed that I was only able to set the "truck" color for scrollbars on Motif.  I tried a variety of methods, including explicitly setting resources for the scrollbar class as documented by the libXm API, and using foreground and background faces, but to no avail.  After looking at the code in src/xterm.c, I noticed that the creation code was not quite correct, so I patched the code (attached):

On Motif scrollbars, "foreground" has no meaning, while "background" means the truck and arrow colors, and "trough" means the background of the entire widget.  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.

I am still a little flummoxed as to why the more sweeping resource settings like "*XmScrollBar*troughColor" seem to have no effect, but that's an issue for another day, and I may look into it further as I have time.

My Emacs environment is 26.3 (but I noticed this code has been like this a long time) running on 64-bit Linux (Gentoo).  The Motif version is 2.3.8.

Thanks,
-Matt
[0001-Fix-ignored-Motif-scrollbar-resources.patch (text/x-patch, attachment)]

This bug report was last modified 5 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.