From: Juanma Barranquero <lektu@terra.es>
Subject: Re: list-colors-display shows only one color
Date: Tue, 12 Feb 2002 13:18:51 +0100 [thread overview]
Message-ID: <20020212125234.B5C4.LEKTU@terra.es> (raw)
In-Reply-To: <20020212100011.B5B9.LEKTU@terra.es>
> I'll try to debug what's happening
On x-display-color-cells:
> if (cap < 0)
> cap = 1 << (dpyinfo->n_planes * dpyinfo->n_cbits);
At this moment dpyinfo->n_planes == 1 and dpyinfo->n_cbits == 32.
(Aside: Interestingly,
cap = 1 << 32;
is statically determined by MSVC to be 0, but
x = 32;
cap = 1 << x;
is 1.)
Anway, 1 << 32 is an error because it's obviously going to overflow cap.
Something like
if (cap < 0)
{
int depth = dpyinfo->n_planes * dpyinfo->n_cbits;
if (depth > SOME_VALUE) {
cap = 1 << SOME_VALUE;
else
cap = 1 << depth;
}
is posible, but:
1.- Is not pretty.
2.- There's no obvious SOME_VALUE; probably it would vary between 16-bit
and 32-bit Windows, the graphics card and driver, etc.
3.- Something's wrong here, I think. Even before Eli's change on
list-colors-display, that function listed more colors that my driver was
able to display simultaneously (because some of them appeared as equal).
OTOH, the driver is saying that it is not palette-based... :(
As expected, setting my Windows in 24-bit color mode works fine.
/L/e/k/t/u
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2002-02-12 12:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-11 18:12 list-colors-display shows only one color Juanma Barranquero
2002-02-11 19:48 ` Eli Zaretskii
2002-02-11 20:44 ` Andreas Schwab
2002-02-12 5:41 ` Eli Zaretskii
2002-02-12 11:01 ` Andreas Schwab
2002-02-12 11:05 ` Eli Zaretskii
2002-02-13 15:37 ` Richard Stallman
2002-02-13 16:25 ` Andreas Schwab
2002-02-12 9:00 ` Juanma Barranquero
2002-02-12 12:18 ` Juanma Barranquero [this message]
2002-02-13 13:31 ` Andreas Schwab
2002-02-13 14:13 ` Juanma Barranquero
2002-02-13 14:39 ` Andreas Schwab
2002-02-13 15:39 ` Richard Stallman
2002-02-13 17:07 ` Juanma Barranquero
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020212125234.B5C4.LEKTU@terra.es \
--to=lektu@terra.es \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).