comparison src/w32fns.c @ 39128:42efaa34094a

(w32_createwindow): Remove the WS_CLIPCHILDREN style from Emacs frames, so that calls to GetClipBox in w32term.c correctly report when part of a frame is visible (including scrollbars, etc). This prevents repeated redrawing of frames when only a scrollbar is visible. (w32_wnd_proc): Add more frame information to debugging output.
author Andrew Innes <andrewi@gnu.org>
date Tue, 04 Sep 2001 17:35:24 +0000
parents 6bc1c4d4eb50
children 2d2b989f4a4b
comparison
equal deleted inserted replaced
39127:a1a9d15a79ba 39128:42efaa34094a
3349 } 3349 }
3350 3350
3351 FRAME_W32_WINDOW (f) = hwnd 3351 FRAME_W32_WINDOW (f) = hwnd
3352 = CreateWindow (EMACS_CLASS, 3352 = CreateWindow (EMACS_CLASS,
3353 f->namebuf, 3353 f->namebuf,
3354 f->output_data.w32->dwStyle | WS_CLIPCHILDREN, 3354 f->output_data.w32->dwStyle,
3355 f->output_data.w32->left_pos, 3355 f->output_data.w32->left_pos,
3356 f->output_data.w32->top_pos, 3356 f->output_data.w32->top_pos,
3357 rect.right - rect.left, 3357 rect.right - rect.left,
3358 rect.bottom - rect.top, 3358 rect.bottom - rect.top,
3359 NULL, 3359 NULL,
4060 GetUpdateRect (hwnd, &wmsg.rect, FALSE); 4060 GetUpdateRect (hwnd, &wmsg.rect, FALSE);
4061 w32_clear_rect (f, hdc, &wmsg.rect); 4061 w32_clear_rect (f, hdc, &wmsg.rect);
4062 release_frame_dc (f, hdc); 4062 release_frame_dc (f, hdc);
4063 4063
4064 #if defined (W32_DEBUG_DISPLAY) 4064 #if defined (W32_DEBUG_DISPLAY)
4065 DebPrint (("WM_ERASEBKGND: erasing %d,%d-%d,%d\n", 4065 DebPrint (("WM_ERASEBKGND (frame %p): erasing %d,%d-%d,%d\n",
4066 wmsg.rect.left, wmsg.rect.top, wmsg.rect.right, 4066 f,
4067 wmsg.rect.bottom)); 4067 wmsg.rect.left, wmsg.rect.top,
4068 wmsg.rect.right, wmsg.rect.bottom));
4068 #endif /* W32_DEBUG_DISPLAY */ 4069 #endif /* W32_DEBUG_DISPLAY */
4069 } 4070 }
4070 return 1; 4071 return 1;
4071 case WM_PALETTECHANGED: 4072 case WM_PALETTECHANGED:
4072 /* ignore our own changes */ 4073 /* ignore our own changes */
4082 case WM_PAINT: 4083 case WM_PAINT:
4083 { 4084 {
4084 PAINTSTRUCT paintStruct; 4085 PAINTSTRUCT paintStruct;
4085 RECT update_rect; 4086 RECT update_rect;
4086 4087
4088 f = x_window_to_frame (dpyinfo, hwnd);
4089 if (f == 0)
4090 {
4091 DebPrint (("WM_PAINT received for unknown window %p\n", hwnd));
4092 return 0;
4093 }
4094
4087 /* MSDN Docs say not to call BeginPaint if GetUpdateRect 4095 /* MSDN Docs say not to call BeginPaint if GetUpdateRect
4088 fails. Apparently this can happen under some 4096 fails. Apparently this can happen under some
4089 circumstances. */ 4097 circumstances. */
4090 if (!w32_strict_painting || GetUpdateRect (hwnd, &update_rect, FALSE)) 4098 if (!w32_strict_painting || GetUpdateRect (hwnd, &update_rect, FALSE))
4091 { 4099 {
4099 wmsg.rect = update_rect; 4107 wmsg.rect = update_rect;
4100 else 4108 else
4101 wmsg.rect = paintStruct.rcPaint; 4109 wmsg.rect = paintStruct.rcPaint;
4102 4110
4103 #if defined (W32_DEBUG_DISPLAY) 4111 #if defined (W32_DEBUG_DISPLAY)
4104 DebPrint (("WM_PAINT: painting %d,%d-%d,%d\n", wmsg.rect.left, 4112 DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",
4105 wmsg.rect.top, wmsg.rect.right, wmsg.rect.bottom)); 4113 f,
4106 DebPrint (("WM_PAINT: update region is %d,%d-%d,%d\n", 4114 wmsg.rect.left, wmsg.rect.top,
4115 wmsg.rect.right, wmsg.rect.bottom));
4116 DebPrint ((" [update region is %d,%d-%d,%d]\n",
4107 update_rect.left, update_rect.top, 4117 update_rect.left, update_rect.top,
4108 update_rect.right, update_rect.bottom)); 4118 update_rect.right, update_rect.bottom));
4109 #endif 4119 #endif
4110 EndPaint (hwnd, &paintStruct); 4120 EndPaint (hwnd, &paintStruct);
4111 leave_crit (); 4121 leave_crit ();