GNU bug report logs - #10397
[PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Thu, 29 Dec 2011 14:10:02 UTC

Severity: normal

Tags: patch

Fixed in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>, 10397 <at> debbugs.gnu.org
Subject: bug#10397: [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround
Date: Thu, 25 Feb 2016 16:55:15 +1030
Daniel Colascione <dancol <at> dancol.org> writes:

>>>    hdc = GetDC (dpyinfo->root_window);
>>>    if (dpyinfo->has_palette)
>>>      cap = GetDeviceCaps (hdc, SIZEPALETTE);
>>> -  else
>>> +  else if (dpyinfo->n_cbits <= 8)
>>> +    /* According to the MSDN, GetDeviceCaps (NUMCOLORS) is valid only
>>> +       for devices with at most eight bits per pixel.  It's supposed
>>> +       to return -1 for other displays, but because it actually
>>> +       returns other, incorrect values under some conditions (e.g.,
>>> +       remote desktop), only use it when we know it's valid.  */
>>>      cap = GetDeviceCaps (hdc, NUMCOLORS);
>>> +  else
>>> +    cap = -1;

Looking at w32fns.c, I can't really find anything that resembles the
surrounding code in this patch.  Instead there seems to be newer code
that does...  stuff...  to palettes.

So is this all outdated now, and this stuff works fine?
-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 8 years and 240 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.