From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#10397: [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround Date: Thu, 29 Dec 2011 08:42:37 -0800 Message-ID: <4EFC987D.2020901@dancol.org> References: <69c9ec930ef1d48655624d437aa66d0fce275d3e.1325166766.git.dancol@dancol.org> <4EFC9416.6090005@dancol.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig93F1F243C853B3A9B7070891" X-Trace: dough.gmane.org 1325177009 5537 80.91.229.12 (29 Dec 2011 16:43:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2011 16:43:29 +0000 (UTC) Cc: 10397@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 29 17:43:24 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgJ4d-0004ZX-3m for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Dec 2011 17:43:23 +0100 Original-Received: from localhost ([::1]:57426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgJ4c-00078Y-NA for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Dec 2011 11:43:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgJ4W-00077s-MA for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 11:43:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgJ4S-0003Tv-5u for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 11:43:16 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgJ4R-0003Tr-VT for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 11:43:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RgJ7C-0005vd-A2 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 11:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Dec 2011 16:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 10397-submit@debbugs.gnu.org id=B10397.132517713422752 (code B ref 10397); Thu, 29 Dec 2011 16:46:02 +0000 Original-Received: (at 10397) by debbugs.gnu.org; 29 Dec 2011 16:45:34 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RgJ6k-0005uv-58 for submit@debbugs.gnu.org; Thu, 29 Dec 2011 11:45:34 -0500 Original-Received: from dancol.org ([96.126.100.184]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RgJ6h-0005uo-Tt for 10397@debbugs.gnu.org; Thu, 29 Dec 2011 11:45:32 -0500 Original-Received: from c-24-18-179-193.hsd1.wa.comcast.net ([24.18.179.193] helo=[192.168.1.2]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1RgJ3w-00080y-59; Thu, 29 Dec 2011 08:42:40 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: X-Enigmail-Version: 1.3.4 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 29 Dec 2011 11:46:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55276 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig93F1F243C853B3A9B7070891 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/29/11 8:27 AM, Juanma Barranquero wrote: > On Thu, Dec 29, 2011 at 17:23, Daniel Colascione wr= ote: >=20 >> Why? What's the point of adding the extra complexity? >> Setting cap to -1 leads to this line >> >> 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24); >> >> which produces a reasonable result for direct color displays. >> Why keep using NUMCOLORS, which we know to be broken? >=20 > No, you said that NUMCOLORS is known to be broken in a very specific > case. In the general, non-RemoteDektop case, it works.=20 I'm not convinced there aren't other bugs lurking in the code backing NUMCOLORS; after all, it's doing the same simple calculation we are, and it's somehow doing it wrong. http://msdn.microsoft.com/en-us/library/dd144877%28v=3DVS.85%29.aspx#3 suggests that NUMCOLORS is generally flaky. > Can you > guarantee that for every non-palettized display, it will produce the > same number? Because otherwise you're changing the current behavior > for people who's not affected by the RemoteDeskopt-related bug. No, I can't guarantee that my original change always produces the same results: it might fix other bugs. --------------enig93F1F243C853B3A9B7070891 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAk78mH4ACgkQ17c2LVA10VuX3QCg2yQgvwHOWcx+OfmCVzBCd5D5 lm4AnRxVwDI35bL/V7Cr/z8NvCM0SNcb =/KMv -----END PGP SIGNATURE----- --------------enig93F1F243C853B3A9B7070891--