unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Ian Eure <ian@digg.com>,
	Adrian Robert <Adrian.B.Robert@gmail.com>,
	3207@emacsbugs.donarmstrong.com
Subject: bug#3207: 23.0.93; x-display-planes is incorrect in NS port
Date: Sun, 10 May 2009 18:11:53 -0400	[thread overview]
Message-ID: <41408556-4627-42E1-99F8-9AB9E4B0F22D@gmail.com> (raw)
In-Reply-To: <87ws8oeibf.fsf@cyd.mit.edu>

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

On May 10, 2009, at 5:53 PM, Chong Yidong wrote:

> Adrian, could you take a look at this bug?  Can you reproduce it?
>
>
> Ian Eure <ian@digg.com> wrote:
>
>> When starting up NextStep Emacs compiled from CVS HEAD, the old XPM
>> splash image is used, rather than the new PNG.
>>
>> This appears to be caused by (display-planes) reporting an eight- 
>> plane
>> display. This is almost certainly incorrect.
>>
>> Looking deeper, (display-planes) calls (x-display-planes), in  
>> nsfns.m.
>> I don’t see anything obviously wrong, but it’s reporting that I have
>> an 8-plane display when it’s 24-plane. Evaluating (x-display-color-
>> cells) produces the correct value: 16777216, indicating a 24-bit
>> display.


Yeah, the x-display-planes implementation in nsfns.m should use  
NSBitsPerPixelFromDepth.
It reports 8 because this is 8 bits per color, and we have three  
colors.  Hence 24bit color depth.

- David



diff --git a/src/nsfns.m b/src/nsfns.m
index a6fb7f1..8b5c330 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2486,7 +2486,7 @@ If omitted or nil, that stands for the selected  
frame's display.  */)
  {
    check_ns ();
    return make_number
-    (NSBitsPerSampleFromDepth ([ns_get_screen (display) depth]));
+    (NSBitsPerPixelFromDepth ([ns_get_screen (display) depth]));
  }




[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

  reply	other threads:[~2009-05-10 22:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10 21:53 bug#3207: 23.0.93; x-display-planes is incorrect in NS port Chong Yidong
2009-05-10 22:11 ` David Reitter [this message]
2009-05-10 22:21   ` Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2009-05-04 17:59 Ian Eure
2009-05-04 19:18 ` Leo

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=41408556-4627-42E1-99F8-9AB9E4B0F22D@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=3207@emacsbugs.donarmstrong.com \
    --cc=Adrian.B.Robert@gmail.com \
    --cc=cyd@stupidchicken.com \
    --cc=ian@digg.com \
    /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).