(w32_defined_color): Apply gamma correction before trying to map to
the palette. (w32_wnd_proc) [WM_ERASE_BACKGROUND]: Pass device context of frame to w32_clear_rect.
This commit is contained in:
parent
00fe468b0b
commit
9badad414d
2 changed files with 32 additions and 7 deletions
|
@ -1,3 +1,26 @@
|
|||
2000-01-23 Jason Rumney <jasonr@gnu.org>
|
||||
|
||||
* w32fns.c (w32_defined_color): Apply gamma correction before
|
||||
trying to map to the palette.
|
||||
(w32_wnd_proc) [WM_ERASE_BACKGROUND]: Pass device context of frame
|
||||
to w32_clear_rect.
|
||||
|
||||
* w32term.c (w32_fill_rect): Do not try to deal with NULL hdc
|
||||
here. Callers changed to always pass real device context.
|
||||
(w32_draw_bitmap): Likewise.
|
||||
(w32_get_glyph_overhangs): Likewise.
|
||||
(w32_draw_box_rect): Make use of s->hdc rather than getting a new
|
||||
one.
|
||||
(w32_set_vertical_scroll_bar): Pass correct HWND parameters to
|
||||
pfnSetScrollInfo and SetScrollRange.
|
||||
(x_get_char_face_and_encoding): Don't turn iso8859-1 characters
|
||||
back into MULE characters after decoding them.
|
||||
(x_get_glyph_face_and_encoding): Likewise.
|
||||
(w32_per_char_metric): Use GetCharExtentPoint32W as fallback when
|
||||
GetCharABCWidthsW fails, since this is defined on Windows 9x.
|
||||
(x_produce_glyphs): Calculate per char metrics for a character
|
||||
that we know exists in default font when font_not_found_p is true.
|
||||
|
||||
2000-01-22 Jason Rumney <jasonr@gnu.org>
|
||||
|
||||
* makefile.nt (intervals.obj, composite.obj): New modules.
|
||||
|
|
16
src/w32fns.c
16
src/w32fns.c
|
@ -1781,6 +1781,12 @@ w32_defined_color (f, color, color_def, alloc)
|
|||
|
||||
if (!NILP (tem))
|
||||
{
|
||||
/* Apply gamma correction. */
|
||||
w32_color_ref = XUINT (tem);
|
||||
gamma_correct (f, &w32_color_ref);
|
||||
XSETINT (tem, w32_color_ref);
|
||||
|
||||
/* Map this color to the palette if it is enabled. */
|
||||
if (!NILP (Vw32_enable_palette))
|
||||
{
|
||||
struct w32_palette_entry * entry =
|
||||
|
@ -1816,12 +1822,6 @@ w32_defined_color (f, color, color_def, alloc)
|
|||
or not the display device has a palette. */
|
||||
w32_color_ref = XUINT (tem) | 0x2000000;
|
||||
|
||||
/* NTEMACS_TODO: Palette mapping should come after gamma
|
||||
correction. */
|
||||
/* Apply gamma correction. */
|
||||
if (f)
|
||||
gamma_correct (f, &w32_color_ref);
|
||||
|
||||
color_def->pixel = w32_color_ref;
|
||||
color_def->red = GetRValue (w32_color_ref);
|
||||
color_def->green = GetGValue (w32_color_ref);
|
||||
|
@ -3881,8 +3881,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
|
|||
f = x_window_to_frame (dpyinfo, hwnd);
|
||||
if (f)
|
||||
{
|
||||
HDC hdc = get_frame_dc (f);
|
||||
GetUpdateRect (hwnd, &wmsg.rect, FALSE);
|
||||
w32_clear_rect (f, NULL, &wmsg.rect);
|
||||
w32_clear_rect (f, hdc, &wmsg.rect);
|
||||
release_frame_dc (f, hdc);
|
||||
|
||||
#if defined (W32_DEBUG_DISPLAY)
|
||||
DebPrint (("WM_ERASEBKGND: erasing %d,%d-%d,%d\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue