emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#10397: closed ([PATCH] Under Remote Desktop, NUMCO


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10397: closed ([PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround)
Date: Tue, 13 Dec 2016 00:05:02 +0000

Your message dated Mon, 12 Dec 2016 19:04:42 -0500
with message-id <address@hidden>
and subject line Re: bug#10397: [PATCH] Under Remote Desktop, NUMCOLORS is 
unreliable; workaround
has caused the debbugs.gnu.org bug report #10397,
regarding [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10397: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10397
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround Date: Thu, 29 Dec 2011 06:05:53 -0800
Under remote desktop, Windows returns the wrong number of colors from
GetDeviceCaps (hdc, NUMCOLORS).  I hit this bug myself, and MSDN
comments seem to indicate that others hit it as well.  The workaround
seems harmless: on non-palettized displays, calculating the number of
display colors based on display bitness should produce good results.
---
 src/w32fns.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/w32fns.c b/src/w32fns.c
index 822e353..4b94f16 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4510,7 +4510,10 @@ If omitted or nil, that stands for the selected frame's 
display.  */)
   if (dpyinfo->has_palette)
     cap = GetDeviceCaps (hdc, SIZEPALETTE);
   else
-    cap = GetDeviceCaps (hdc, NUMCOLORS);
+    // GetDeviceCaps (NUMCOLORS) is buggy under remote desktop and sometimes
+    // returns the number of system reserved colors (20) instead of
+    // the actual number of available colors.
+    cap = -1;
 
   /* We force 24+ bit depths to 24-bit, both to prevent an overflow
      and because probably is more meaningful on Windows anyway */
-- 
1.7.5.1




--- End Message ---
--- Begin Message --- Subject: Re: bug#10397: [PATCH] Under Remote Desktop, NUMCOLORS is unreliable; workaround Date: Mon, 12 Dec 2016 19:04:42 -0500 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.3

I see this was fixed in emacs-24.2-3079-g821812e.



--- End Message ---

reply via email to

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