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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37359 in the body.
You can then email your comments to 37359 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Mon, 09 Sep 2019 18:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Bisson <mbisson <at> ccs.neu.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 Sep 2019 18:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: [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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 10 Sep 2019 07:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Matt Bisson <mbisson <at> ccs.neu.edu>, 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 10 Sep 2019 09:56:03 +0200
> 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.

Sounds reasonable so I intend to install it.  I suppose that you have
not done any copyright assignment so I'll mark this as a tiny change.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 10 Sep 2019 13:30:01 GMT) Full text and rfc822 format available.

Message #11 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 10 Sep 2019 09:26:21 -0400 (EDT)
> I suppose that you have not done any copyright assignment so I'll mark this as a tiny change.

From the copyright assignment page, it seems reasonable to call this a tiny change, so I didn't do the assignment:

> We can accept small changes (roughly, fewer than 15 lines) without an assignment. This is a cumulative limit (e.g., three separate 5 line patches) over all your contributions.

If you prefer, I can go through that process as well.  Whatever is easier.

> Sounds reasonable so I intend to install it.

When you say "install" do you mean you are going to test it, and I should push to the repo (which I am completely willing to do), or do you mean you are going to commit the patch when ready?  (The patch is against the emacs-26 branch, btw.)

Thanks,
-Matt

----- Original Message -----
From: "martin rudalics" <rudalics <at> gmx.at>
To: "mbisson" <mbisson <at> ccs.neu.edu>, 37359 <at> debbugs.gnu.org
Sent: Tuesday, September 10, 2019 3:56:03 AM
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.

> 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.

Sounds reasonable so I intend to install it.  I suppose that you have
not done any copyright assignment so I'll mark this as a tiny change.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 10 Sep 2019 20:28:01 GMT) Full text and rfc822 format available.

Message #14 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Matt Bisson <mbisson <at> ccs.neu.edu>
Cc: 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 10 Sep 2019 22:25:18 +0200
> If you prefer, I can go through that process as well.  Whatever is easier.

I obviously prefer that you go through that process so we can accept
your future changes (resolving the "*XmScrollBar*troughColor" issue,
for instance).  But it's not necessary for the change at hand.

> When you say "install" do you mean you are going to test it, and I
> should push to the repo (which I am completely willing to do), or do
> you mean you are going to commit the patch when ready?  (The patch
> is against the emacs-26 branch, btw.)

I have tested it on current master (Motif 2.3.4) and will commit it
there.  It would be nice though if you provided a ChangeLog entry.

TIA, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 10 Sep 2019 20:37:01 GMT) Full text and rfc822 format available.

Message #17 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 10 Sep 2019 16:35:57 -0400 (EDT)
Good point (about the ChangeLog).  Let me update that, and get the necessary legal items taken care of, and get back to you.  It will be a few days probably, so hopefully nobody is desperate for the fix. ;-D

Thanks,
-Matt

----- Original Message -----
From: "martin rudalics" <rudalics <at> gmx.at>
To: "mbisson" <mbisson <at> ccs.neu.edu>
Cc: 37359 <at> debbugs.gnu.org
Sent: Tuesday, September 10, 2019 4:25:18 PM
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.

> If you prefer, I can go through that process as well.  Whatever is easier.

I obviously prefer that you go through that process so we can accept
your future changes (resolving the "*XmScrollBar*troughColor" issue,
for instance).  But it's not necessary for the change at hand.

 > When you say "install" do you mean you are going to test it, and I
 > should push to the repo (which I am completely willing to do), or do
 > you mean you are going to commit the patch when ready?  (The patch
 > is against the emacs-26 branch, btw.)

I have tested it on current master (Motif 2.3.4) and will commit it
there.  It would be nice though if you provided a ChangeLog entry.

TIA, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Mon, 16 Sep 2019 20:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Matt Bisson <mbisson <at> ccs.neu.edu>
Cc: martin rudalics <rudalics <at> gmx.at>, 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 16 Sep 2019 16:00:28 -0400
Not related to your report in any way, but the Motif version of Emacs is
very rarely used. Could you say why you use it?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Mon, 16 Sep 2019 20:15:01 GMT) Full text and rfc822 format available.

Message #23 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: Glenn Morris <rgm <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 16 Sep 2019 16:14:34 -0400 (EDT)
A few reasons:
1) I like it. :)
2) I'm warded away from GTK because of the very long-standing bug in the toolkit that results in core files when I use --daemon.
3) I've been doing some work on CDE, which of course tightly integrates with Motif.

Cheers,
-Matt

PS: I'm still waiting to hear back from the copyright-assign mailing list about my filing, so it will be a little bit longer yet.

----- Original Message -----
From: "Glenn Morris" <rgm <at> gnu.org>
To: "mbisson" <mbisson <at> ccs.neu.edu>
Cc: "martin rudalics" <rudalics <at> gmx.at>, 37359 <at> debbugs.gnu.org
Sent: Monday, September 16, 2019 4:00:28 PM
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.

Not related to your report in any way, but the Motif version of Emacs is
very rarely used. Could you say why you use it?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 17 Sep 2019 01:14:01 GMT) Full text and rfc822 format available.

Message #26 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Matt Bisson <mbisson <at> ccs.neu.edu>
Cc: martin rudalics <rudalics <at> gmx.at>, 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 16 Sep 2019 21:13:44 -0400
Matt Bisson wrote:

> 2) I'm warded away from GTK because of the very long-standing bug in
> the toolkit that results in core files when I use --daemon.

(FWIW, the more common solution for this is the Lucid/Athena toolkit version.)

> 3) I've been doing some work on CDE, which of course tightly
> integrates with Motif.

Thanks, I might try out CDE to see if it looks like I remember from back
in the day! :)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 17 Sep 2019 15:42:02 GMT) Full text and rfc822 format available.

Message #29 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 17 Sep 2019 11:41:56 -0400 (EDT)
[Message part 1 (text/plain, inline)]
I have filed the legal copyright transfer paperwork, but this takes time, and I was told to go ahead and update the patches without it, so I've updated the patch (mostly the commit description), and I'm attaching a ChangeLog file here as requested.

Would it be possible to back-port this into an earlier version of Emacs than ToT (my patch was done against the emacs-26 branch)?  Just curious.

Cheers,
-Matt

----- Original Message -----
From: "martin rudalics" <rudalics <at> gmx.at>
To: "mbisson" <mbisson <at> ccs.neu.edu>
Cc: 37359 <at> debbugs.gnu.org
Sent: Tuesday, September 10, 2019 4:25:18 PM
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.

> If you prefer, I can go through that process as well.  Whatever is easier.

I obviously prefer that you go through that process so we can accept
your future changes (resolving the "*XmScrollBar*troughColor" issue,
for instance).  But it's not necessary for the change at hand.

 > When you say "install" do you mean you are going to test it, and I
 > should push to the repo (which I am completely willing to do), or do
 > you mean you are going to commit the patch when ready?  (The patch
 > is against the emacs-26 branch, btw.)

I have tested it on current master (Motif 2.3.4) and will commit it
there.  It would be nice though if you provided a ChangeLog entry.

TIA, martin
[ChangeLog (text/x-changelog, attachment)]
[0001-Fix-ignored-Motif-scrollbar-resources.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Tue, 17 Sep 2019 15:57:02 GMT) Full text and rfc822 format available.

Message #32 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matt Bisson <mbisson <at> ccs.neu.edu>
Cc: rudalics <at> gmx.at, 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 17 Sep 2019 18:55:59 +0300
> Date: Tue, 17 Sep 2019 11:41:56 -0400 (EDT)
> From: Matt Bisson <mbisson <at> ccs.neu.edu>
> Cc: 37359 <at> debbugs.gnu.org
> 
> Would it be possible to back-port this into an earlier version of Emacs than ToT (my patch was done against the emacs-26 branch)?  Just curious.

We could back-port it, but it makes little sense, since we don't plan
to have any further releases from the emacs-26 branch.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Wed, 18 Sep 2019 07:47:01 GMT) Full text and rfc822 format available.

Message #35 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Matt Bisson <mbisson <at> ccs.neu.edu>
Cc: 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Wed, 18 Sep 2019 09:46:13 +0200
> I have filed the legal copyright transfer paperwork, but this takes
> time, and I was told to go ahead and update the patches without it,
> so I've updated the patch (mostly the commit description), and I'm
> attaching a ChangeLog file here as requested.

Thanks.  I'll install this as soon as I'm able to build Emacs again.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Thu, 19 Sep 2019 08:18:02 GMT) Full text and rfc822 format available.

Message #38 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Matt Bisson <mbisson <at> ccs.neu.edu>
Cc: 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Thu, 19 Sep 2019 10:16:54 +0200
> I have filed the legal copyright transfer paperwork, but this takes
> time, and I was told to go ahead and update the patches without it,
> so I've updated the patch (mostly the commit description), and I'm
> attaching a ChangeLog file here as requested.

Installed.  Just that I completely missed the fact that a similar
change would be now required for horizontal scroll bars as well.  Can
you please provide one.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Mon, 07 Oct 2019 04:55:02 GMT) Full text and rfc822 format available.

Message #41 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 37359 <at> debbugs.gnu.org, Matt Bisson <mbisson <at> ccs.neu.edu>
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 07 Oct 2019 06:54:03 +0200
martin rudalics <rudalics <at> gmx.at> writes:

> Installed.  Just that I completely missed the fact that a similar
> change would be now required for horizontal scroll bars as well.  Can
> you please provide one.

That was a couple of weeks ago, so I just cargo-culted the vertical
scroll bar changes to the horizontal ones, and it seems to work fine.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 27.1, send any further explanations to 37359 <at> debbugs.gnu.org and Matt Bisson <mbisson <at> ccs.neu.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Oct 2019 04:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Mon, 07 Oct 2019 09:27:02 GMT) Full text and rfc822 format available.

Message #46 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37359 <at> debbugs.gnu.org, Matt Bisson <mbisson <at> ccs.neu.edu>
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 7 Oct 2019 11:26:29 +0200
> That was a couple of weeks ago, so I just cargo-culted the vertical
> scroll bar changes to the horizontal ones, and it seems to work fine.

Thanks, martin






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37359; Package emacs. (Mon, 07 Oct 2019 13:29:01 GMT) Full text and rfc822 format available.

Message #49 received at 37359 <at> debbugs.gnu.org (full text, mbox):

From: Matt Bisson <mbisson <at> ccs.neu.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 37359 <at> debbugs.gnu.org
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Mon, 7 Oct 2019 09:27:56 -0400 (EDT)
Sorry, I didn't get back to this in time -- work has been hectic of late!  Thanks for fixing this.

----- Original Message -----
From: "martin rudalics" <rudalics <at> gmx.at>
To: "Lars Ingebrigtsen" <larsi <at> gnus.org>
Cc: "mbisson" <mbisson <at> ccs.neu.edu>, 37359 <at> debbugs.gnu.org
Sent: Monday, October 7, 2019 5:26:29 AM
Subject: Re: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.

> That was a couple of weeks ago, so I just cargo-culted the vertical
> scroll bar changes to the horizontal ones, and it seems to work fine.

Thanks, martin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Nov 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 174 days ago.

Previous Next


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