Commit 18f0b342 authored by Andrew Innes's avatar Andrew Innes
Browse files

(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.
parent 2a5becfb
...@@ -3351,7 +3351,7 @@ w32_createwindow (f) ...@@ -3351,7 +3351,7 @@ w32_createwindow (f)
FRAME_W32_WINDOW (f) = hwnd FRAME_W32_WINDOW (f) = hwnd
= CreateWindow (EMACS_CLASS, = CreateWindow (EMACS_CLASS,
f->namebuf, f->namebuf,
f->output_data.w32->dwStyle | WS_CLIPCHILDREN, f->output_data.w32->dwStyle,
f->output_data.w32->left_pos, f->output_data.w32->left_pos,
f->output_data.w32->top_pos, f->output_data.w32->top_pos,
rect.right - rect.left, rect.right - rect.left,
...@@ -4062,9 +4062,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) ...@@ -4062,9 +4062,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
release_frame_dc (f, hdc); release_frame_dc (f, hdc);
#if defined (W32_DEBUG_DISPLAY) #if defined (W32_DEBUG_DISPLAY)
DebPrint (("WM_ERASEBKGND: erasing %d,%d-%d,%d\n", DebPrint (("WM_ERASEBKGND (frame %p): erasing %d,%d-%d,%d\n",
wmsg.rect.left, wmsg.rect.top, wmsg.rect.right, f,
wmsg.rect.bottom)); wmsg.rect.left, wmsg.rect.top,
wmsg.rect.right, wmsg.rect.bottom));
#endif /* W32_DEBUG_DISPLAY */ #endif /* W32_DEBUG_DISPLAY */
} }
return 1; return 1;
...@@ -4084,6 +4085,13 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) ...@@ -4084,6 +4085,13 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
PAINTSTRUCT paintStruct; PAINTSTRUCT paintStruct;
RECT update_rect; RECT update_rect;
f = x_window_to_frame (dpyinfo, hwnd);
if (f == 0)
{
DebPrint (("WM_PAINT received for unknown window %p\n", hwnd));
return 0;
}
/* MSDN Docs say not to call BeginPaint if GetUpdateRect /* MSDN Docs say not to call BeginPaint if GetUpdateRect
fails. Apparently this can happen under some fails. Apparently this can happen under some
circumstances. */ circumstances. */
...@@ -4101,9 +4109,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) ...@@ -4101,9 +4109,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
wmsg.rect = paintStruct.rcPaint; wmsg.rect = paintStruct.rcPaint;
#if defined (W32_DEBUG_DISPLAY) #if defined (W32_DEBUG_DISPLAY)
DebPrint (("WM_PAINT: painting %d,%d-%d,%d\n", wmsg.rect.left, DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",
wmsg.rect.top, wmsg.rect.right, wmsg.rect.bottom)); f,
DebPrint (("WM_PAINT: update region is %d,%d-%d,%d\n", wmsg.rect.left, wmsg.rect.top,
wmsg.rect.right, wmsg.rect.bottom));
DebPrint ((" [update region is %d,%d-%d,%d]\n",
update_rect.left, update_rect.top, update_rect.left, update_rect.top,
update_rect.right, update_rect.bottom)); update_rect.right, update_rect.bottom));
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment