all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: 52052@debbugs.gnu.org
Subject: bug#52052: [PATCH] Re-enable the disabledForeground X resource
Date: Tue, 23 Nov 2021 09:55:22 +0000	[thread overview]
Message-ID: <890d44ded256e0b6fc3a@heytings.org> (raw)

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


The disabledForeground X resource is defined in the code, it is read and 
allocated, but it is overwritten before being used with the value of the 
foreground X resource.  I attach a patch which re-enables that resource.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=Re-enable-the-disabledForeground-X-resource.patch, Size: 2034 bytes --]

From fd8aa00b17057a13e9af3723b10a092bdf3c58c1 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Tue, 23 Nov 2021 09:51:04 +0000
Subject: [PATCH] Re-enable the disabledForeground X resource.

* lwlib/xlwmenu.c (make_drawing_gcs): Re-enable the use of the
disabledForeground resource.  The use of this X resource was disabled
without reason in commit ef93458b2f8 by overwriting its value with the
value of the foreground resource.

* doc/emacs/xresources.texi (Lucid Resources): Document the resource.
Also document the 'cursor' resource.
---
 doc/emacs/xresources.texi | 5 +++++
 lwlib/xlwmenu.c           | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index 0e0070829c..a7bd006df4 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -395,6 +395,8 @@ Lucid Resources
 Foreground color for a selected item.
 @item foreground
 Foreground color.
+@item disabledForeground
+Foreground color for a disabled menu item.
 @ifnottex
 @item horizontalSpacing
 Horizontal spacing in pixels between items.  Default is 3.
@@ -409,6 +411,9 @@ Lucid Resources
 @item borderThickness
 Thickness of the external borders of the menu bars and pop-up menus.
 Default is 1.
+@item cursor
+Name of the cursor to use in the menu bars and pop-up menus.  Default
+is @code{"right_ptr"}.
 @end ifnottex
 @item margin
 Margin of the menu bar, in characters.  Default is 1.
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 5f8832bb36..a0a10d13db 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -1657,7 +1657,6 @@ make_drawing_gcs (XlwMenuWidget mw)
 #define BRIGHTNESS(color) (((color) & 0xff) + (((color) >> 8) & 0xff) + (((color) >> 16) & 0xff))
 
   /* Allocate color for disabled menu-items.  */
-  mw->menu.disabled_foreground = mw->menu.foreground;
   if (BRIGHTNESS(mw->menu.foreground) < BRIGHTNESS(mw->core.background_pixel))
     scale = 2.3;
   else
-- 
2.33.0


             reply	other threads:[~2021-11-23  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23  9:55 Gregory Heytings [this message]
2021-11-24  7:54 ` bug#52052: [PATCH] Re-enable the disabledForeground X resource Lars Ingebrigtsen

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=890d44ded256e0b6fc3a@heytings.org \
    --to=gregory@heytings.org \
    --cc=52052@debbugs.gnu.org \
    /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.