diff options
| author | Daniel Colascione | 2012-10-08 10:47:29 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2012-10-08 10:47:29 -0800 |
| commit | 61af95a53cbf68b9a0673f0b031101f41adc63b2 (patch) | |
| tree | 24745b6940b058d2a8a6737e32c8f5c3ff11e8e0 /src | |
| parent | 62c480c90a5fedee7dfa7d4d3c7c045ca9e0e892 (diff) | |
| parent | 821812e2477f45ac5f2572dd7d469b8408e351aa (diff) | |
| download | emacs-61af95a53cbf68b9a0673f0b031101f41adc63b2.tar.gz emacs-61af95a53cbf68b9a0673f0b031101f41adc63b2.zip | |
Merge into trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/w32fns.c | 18 |
2 files changed, 11 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b348ec06538..4531cee8dba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,10 +1,15 @@ | |||
| 1 | 2012-10-08 Jan Djärv <jan.h.d@swipnet.se> | 1 | 2012-10-08 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | |||
| 3 | * nsfont.m (Vfonts_in_cache): New variable. | 2 | * nsfont.m (Vfonts_in_cache): New variable. |
| 4 | (nsfont_open): Use unsignedLongLongValue for cache in case wide ints | 3 | (nsfont_open): Use unsignedLongLongValue for cache in case wide ints |
| 5 | are used. Add cached fonts to Vfonts_in_cache. | 4 | are used. Add cached fonts to Vfonts_in_cache. |
| 6 | (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache. | 5 | (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache. |
| 7 | 6 | ||
| 7 | 2012-10-08 Daniel Colascione <dancol@dancol.org> | ||
| 8 | * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS, | ||
| 9 | which is broke under remote desktop, calculating the number of | ||
| 10 | colors available for a display based on the display's number of | ||
| 11 | planes and number of bits per pixel per plane. (bug#10397). | ||
| 12 | |||
| 8 | 2012-10-08 Juanma Barranquero <lekktu@gmail.com> | 13 | 2012-10-08 Juanma Barranquero <lekktu@gmail.com> |
| 9 | 14 | ||
| 10 | * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now | 15 | * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now |
diff --git a/src/w32fns.c b/src/w32fns.c index e728d19a9b3..ff8e5fef439 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4642,22 +4642,14 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 4642 | (Lisp_Object display) | 4642 | (Lisp_Object display) |
| 4643 | { | 4643 | { |
| 4644 | struct w32_display_info *dpyinfo = check_x_display_info (display); | 4644 | struct w32_display_info *dpyinfo = check_x_display_info (display); |
| 4645 | HDC hdc; | ||
| 4646 | int cap; | 4645 | int cap; |
| 4647 | 4646 | ||
| 4648 | hdc = GetDC (dpyinfo->root_window); | 4647 | /* Don't use NCOLORS: it returns incorrect results under remote |
| 4649 | if (dpyinfo->has_palette) | 4648 | * desktop. We force 24+ bit depths to 24-bit, both to prevent an |
| 4650 | cap = GetDeviceCaps (hdc, SIZEPALETTE); | 4649 | * overflow and because probably is more meaningful on Windows |
| 4651 | else | 4650 | * anyway. */ |
| 4652 | cap = GetDeviceCaps (hdc, NUMCOLORS); | ||
| 4653 | |||
| 4654 | /* We force 24+ bit depths to 24-bit, both to prevent an overflow | ||
| 4655 | and because probably is more meaningful on Windows anyway */ | ||
| 4656 | if (cap < 0) | ||
| 4657 | cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24); | ||
| 4658 | |||
| 4659 | ReleaseDC (dpyinfo->root_window, hdc); | ||
| 4660 | 4651 | ||
| 4652 | cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24); | ||
| 4661 | return make_number (cap); | 4653 | return make_number (cap); |
| 4662 | } | 4654 | } |
| 4663 | 4655 | ||