[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10397: [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workar

From: Lars Ingebrigtsen
Subject: bug#10397: [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround
Date: Thu, 25 Feb 2016 16:55:15 +1030
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Daniel Colascione <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]