Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
61af95a5
Commit
61af95a5
authored
Oct 08, 2012
by
Daniel Colascione
Browse files
Merge into trunk
parents
62c480c9
821812e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
src/ChangeLog
src/ChangeLog
+6
-1
src/w32fns.c
src/w32fns.c
+5
-13
No files found.
src/ChangeLog
View file @
61af95a5
2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
* nsfont.m (Vfonts_in_cache): New variable.
(nsfont_open): Use unsignedLongLongValue for cache in case wide ints
are used. Add cached fonts to Vfonts_in_cache.
(syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
2012-10-08 Daniel Colascione <dancol@dancol.org>
* w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
which is broke under remote desktop, calculating the number of
colors available for a display based on the display's number of
planes and number of bits per pixel per plane. (bug#10397).
2012-10-08 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
...
...
src/w32fns.c
View file @
61af95a5
...
...
@@ -4642,22 +4642,14 @@ If omitted or nil, that stands for the selected frame's display. */)
(Lisp_Object display)
{
struct w32_display_info *dpyinfo = check_x_display_info (display);
HDC hdc;
int cap;
hdc = GetDC (dpyinfo->root_window);
if (dpyinfo->has_palette)
cap = GetDeviceCaps (hdc, SIZEPALETTE);
else
cap = GetDeviceCaps (hdc, NUMCOLORS);
/* We force 24+ bit depths to 24-bit, both to prevent an overflow
and because probably is more meaningful on Windows anyway */
if (cap < 0)
cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24);
ReleaseDC (dpyinfo->root_window, hdc);
/* Don't use NCOLORS: it returns incorrect results under remote
* desktop. We force 24+ bit depths to 24-bit, both to prevent an
* overflow and because probably is more meaningful on Windows
* anyway. */
cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24);
return make_number (cap);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment