all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matt Bisson <mbisson@ccs.neu.edu>
To: martin rudalics <rudalics@gmx.at>
Cc: 37359@debbugs.gnu.org
Subject: bug#37359: [PATCH] Fix ignored Motif scrollbar resources.
Date: Tue, 17 Sep 2019 11:41:56 -0400 (EDT)	[thread overview]
Message-ID: <1866745835.2036645.1568734916560.JavaMail.zimbra@zimbra.ccs.neu.edu> (raw)
In-Reply-To: <f7b82348-1444-bc08-e8c6-e3524c8e1567@gmx.at>

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

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@gmx.at>
To: "mbisson" <mbisson@ccs.neu.edu>
Cc: 37359@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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ChangeLog --]
[-- Type: text/x-changelog; name=ChangeLog, Size: 498 bytes --]

2019-09-17  Matt Bisson  <mbisson@mbisson-devd1>

	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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-Fix-ignored-Motif-scrollbar-resources.patch --]
[-- Type: text/x-patch; name=0001-Fix-ignored-Motif-scrollbar-resources.patch, Size: 1502 bytes --]

From 6168bbca7e471447f84e3de1a9fa6fbabcc9a962 Mon Sep 17 00:00:00 2001
From: Matt Bisson <mbisson@vmware.com>
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


  parent reply	other threads:[~2019-09-17 15:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 18:27 bug#37359: [PATCH] Fix ignored Motif scrollbar resources Matt Bisson
2019-09-10  7:56 ` martin rudalics
2019-09-10 13:26   ` Matt Bisson
2019-09-10 20:25     ` martin rudalics
2019-09-10 20:35       ` Matt Bisson
2019-09-16 20:00         ` Glenn Morris
2019-09-16 20:14           ` Matt Bisson
2019-09-17  1:13             ` Glenn Morris
2019-09-17 15:41       ` Matt Bisson [this message]
2019-09-17 15:55         ` Eli Zaretskii
2019-09-18  7:46         ` martin rudalics
2019-09-19  8:16         ` martin rudalics
2019-10-07  4:54           ` Lars Ingebrigtsen
2019-10-07  9:26             ` martin rudalics
2019-10-07 13:27               ` Matt Bisson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1866745835.2036645.1568734916560.JavaMail.zimbra@zimbra.ccs.neu.edu \
    --to=mbisson@ccs.neu.edu \
    --cc=37359@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.