aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2000-01-23 22:20:24 +0000
committerJason Rumney2000-01-23 22:20:24 +0000
commit9badad414d2265f01b26108dbfd966c9d384d70b (patch)
treebf2d24331646425b889dcafeee7cef6419296092 /src
parent00fe468b0be661e3546dfe36efd5586ef753d12d (diff)
downloademacs-9badad414d2265f01b26108dbfd966c9d384d70b.tar.gz
emacs-9badad414d2265f01b26108dbfd966c9d384d70b.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog23
-rw-r--r--src/w32fns.c16
2 files changed, 32 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 17cc9052c33..6f52fa04804 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,26 @@
12000-01-23 Jason Rumney <jasonr@gnu.org>
2
3 * w32fns.c (w32_defined_color): Apply gamma correction before
4 trying to map to the palette.
5 (w32_wnd_proc) [WM_ERASE_BACKGROUND]: Pass device context of frame
6 to w32_clear_rect.
7
8 * w32term.c (w32_fill_rect): Do not try to deal with NULL hdc
9 here. Callers changed to always pass real device context.
10 (w32_draw_bitmap): Likewise.
11 (w32_get_glyph_overhangs): Likewise.
12 (w32_draw_box_rect): Make use of s->hdc rather than getting a new
13 one.
14 (w32_set_vertical_scroll_bar): Pass correct HWND parameters to
15 pfnSetScrollInfo and SetScrollRange.
16 (x_get_char_face_and_encoding): Don't turn iso8859-1 characters
17 back into MULE characters after decoding them.
18 (x_get_glyph_face_and_encoding): Likewise.
19 (w32_per_char_metric): Use GetCharExtentPoint32W as fallback when
20 GetCharABCWidthsW fails, since this is defined on Windows 9x.
21 (x_produce_glyphs): Calculate per char metrics for a character
22 that we know exists in default font when font_not_found_p is true.
23
12000-01-22 Jason Rumney <jasonr@gnu.org> 242000-01-22 Jason Rumney <jasonr@gnu.org>
2 25
3 * makefile.nt (intervals.obj, composite.obj): New modules. 26 * makefile.nt (intervals.obj, composite.obj): New modules.
diff --git a/src/w32fns.c b/src/w32fns.c
index 5b6c9d3d3b1..21d80af0572 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1781,6 +1781,12 @@ w32_defined_color (f, color, color_def, alloc)
1781 1781
1782 if (!NILP (tem)) 1782 if (!NILP (tem))
1783 { 1783 {
1784 /* Apply gamma correction. */
1785 w32_color_ref = XUINT (tem);
1786 gamma_correct (f, &w32_color_ref);
1787 XSETINT (tem, w32_color_ref);
1788
1789 /* Map this color to the palette if it is enabled. */
1784 if (!NILP (Vw32_enable_palette)) 1790 if (!NILP (Vw32_enable_palette))
1785 { 1791 {
1786 struct w32_palette_entry * entry = 1792 struct w32_palette_entry * entry =
@@ -1816,12 +1822,6 @@ w32_defined_color (f, color, color_def, alloc)
1816 or not the display device has a palette. */ 1822 or not the display device has a palette. */
1817 w32_color_ref = XUINT (tem) | 0x2000000; 1823 w32_color_ref = XUINT (tem) | 0x2000000;
1818 1824
1819 /* NTEMACS_TODO: Palette mapping should come after gamma
1820 correction. */
1821 /* Apply gamma correction. */
1822 if (f)
1823 gamma_correct (f, &w32_color_ref);
1824
1825 color_def->pixel = w32_color_ref; 1825 color_def->pixel = w32_color_ref;
1826 color_def->red = GetRValue (w32_color_ref); 1826 color_def->red = GetRValue (w32_color_ref);
1827 color_def->green = GetGValue (w32_color_ref); 1827 color_def->green = GetGValue (w32_color_ref);
@@ -3881,8 +3881,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3881 f = x_window_to_frame (dpyinfo, hwnd); 3881 f = x_window_to_frame (dpyinfo, hwnd);
3882 if (f) 3882 if (f)
3883 { 3883 {
3884 HDC hdc = get_frame_dc (f);
3884 GetUpdateRect (hwnd, &wmsg.rect, FALSE); 3885 GetUpdateRect (hwnd, &wmsg.rect, FALSE);
3885 w32_clear_rect (f, NULL, &wmsg.rect); 3886 w32_clear_rect (f, hdc, &wmsg.rect);
3887 release_frame_dc (f, hdc);
3886 3888
3887#if defined (W32_DEBUG_DISPLAY) 3889#if defined (W32_DEBUG_DISPLAY)
3888 DebPrint (("WM_ERASEBKGND: erasing %d,%d-%d,%d\n", 3890 DebPrint (("WM_ERASEBKGND: erasing %d,%d-%d,%d\n",