/[emacs]/emacs/src/w32fns.c
ViewVC logotype

Diff of /emacs/src/w32fns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.151 by jasonr, Wed Jan 23 21:52:41 2002 UTC revision 1.152 by jasonr, Thu Jan 24 20:46:32 2002 UTC
# Line 4157  w32_wnd_proc (hwnd, msg, wParam, lParam) Line 4157  w32_wnd_proc (hwnd, msg, wParam, lParam)
4157        {        {
4158          PAINTSTRUCT paintStruct;          PAINTSTRUCT paintStruct;
4159          RECT update_rect;          RECT update_rect;
4160            bzero (&update_rect, sizeof (update_rect));
4161    
4162          f = x_window_to_frame (dpyinfo, hwnd);          f = x_window_to_frame (dpyinfo, hwnd);
4163          if (f == 0)          if (f == 0)
# Line 4168  w32_wnd_proc (hwnd, msg, wParam, lParam) Line 4169  w32_wnd_proc (hwnd, msg, wParam, lParam)
4169          /* MSDN Docs say not to call BeginPaint if GetUpdateRect          /* MSDN Docs say not to call BeginPaint if GetUpdateRect
4170             fails.  Apparently this can happen under some             fails.  Apparently this can happen under some
4171             circumstances.  */             circumstances.  */
4172          if (!w32_strict_painting || GetUpdateRect (hwnd, &update_rect, FALSE))          if (GetUpdateRect (hwnd, &update_rect, FALSE) || !w32_strict_painting)
4173            {            {
4174              enter_crit ();              enter_crit ();
4175              BeginPaint (hwnd, &paintStruct);              BeginPaint (hwnd, &paintStruct);
4176    
4177              if (w32_strict_painting)              /* The rectangles returned by GetUpdateRect and BeginPaint
4178                /* The rectangles returned by GetUpdateRect and BeginPaint                 do not always match.  Play it safe by assuming both areas
4179                   do not always match.  GetUpdateRect seems to be the                 are invalid.  */
4180                   more reliable of the two.  */              UnionRect (&(wmsg.rect), &update_rect, &(paintStruct.rcPaint));
               wmsg.rect = update_rect;  
             else  
               wmsg.rect = paintStruct.rcPaint;  
4181    
4182  #if defined (W32_DEBUG_DISPLAY)  #if defined (W32_DEBUG_DISPLAY)
4183              DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",              DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26