aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/w32fns.c14
2 files changed, 15 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2095530c7ad..d34f4602481 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12002-01-24 Jason Rumney <jasonr@gnu.org>
2
3 * w32term.c (x_scroll_run): Use ScrollWindowEx in place of BitBlt.
4 If region left to draw is not what was expected, mark the frame as
5 garbaged.
6
7 * w32fns.c (w32_wnd_proc) <WM_PAINT>: Initialize update_rect.
8 Combine the regions returned by BeginPaint and GetUpdateRect.
9
12002-01-23 Jason Rumney <jasonr@gnu.org> 102002-01-23 Jason Rumney <jasonr@gnu.org>
2 11
3 * w32term.c (x_update_window_begin): Only hide caret if 12 * w32term.c (x_update_window_begin): Only hide caret if
diff --git a/src/w32fns.c b/src/w32fns.c
index beb61281794..38de4b47ef4 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4157,6 +4157,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
4157 { 4157 {
4158 PAINTSTRUCT paintStruct; 4158 PAINTSTRUCT paintStruct;
4159 RECT update_rect; 4159 RECT update_rect;
4160 bzero (&update_rect, sizeof (update_rect));
4160 4161
4161 f = x_window_to_frame (dpyinfo, hwnd); 4162 f = x_window_to_frame (dpyinfo, hwnd);
4162 if (f == 0) 4163 if (f == 0)
@@ -4168,18 +4169,15 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
4168 /* MSDN Docs say not to call BeginPaint if GetUpdateRect 4169 /* MSDN Docs say not to call BeginPaint if GetUpdateRect
4169 fails. Apparently this can happen under some 4170 fails. Apparently this can happen under some
4170 circumstances. */ 4171 circumstances. */
4171 if (!w32_strict_painting || GetUpdateRect (hwnd, &update_rect, FALSE)) 4172 if (GetUpdateRect (hwnd, &update_rect, FALSE) || !w32_strict_painting)
4172 { 4173 {
4173 enter_crit (); 4174 enter_crit ();
4174 BeginPaint (hwnd, &paintStruct); 4175 BeginPaint (hwnd, &paintStruct);
4175 4176
4176 if (w32_strict_painting) 4177 /* The rectangles returned by GetUpdateRect and BeginPaint
4177 /* The rectangles returned by GetUpdateRect and BeginPaint 4178 do not always match. Play it safe by assuming both areas
4178 do not always match. GetUpdateRect seems to be the 4179 are invalid. */
4179 more reliable of the two. */ 4180 UnionRect (&(wmsg.rect), &update_rect, &(paintStruct.rcPaint));
4180 wmsg.rect = update_rect;
4181 else
4182 wmsg.rect = paintStruct.rcPaint;
4183 4181
4184#if defined (W32_DEBUG_DISPLAY) 4182#if defined (W32_DEBUG_DISPLAY)
4185 DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n", 4183 DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",