aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes2001-09-04 17:35:24 +0000
committerAndrew Innes2001-09-04 17:35:24 +0000
commit18f0b3428088385e9cc14fc0dee7525ba397a0b0 (patch)
treeaebe1e88c6e97b7026b97cd7d11111227c3bc4cf
parent2a5becfb51236b09579de6cde203f47c489f2b0e (diff)
downloademacs-18f0b3428088385e9cc14fc0dee7525ba397a0b0.tar.gz
emacs-18f0b3428088385e9cc14fc0dee7525ba397a0b0.zip
(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.
-rw-r--r--src/w32fns.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 113305ccc95..054d477cee8 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3351,7 +3351,7 @@ w32_createwindow (f)
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,
@@ -4062,9 +4062,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
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;
@@ -4084,6 +4085,13 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
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. */
@@ -4101,9 +4109,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
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