changeset 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 a1a9d15a79ba
children 651a67207f2b
files src/w32fns.c
diffstat 1 files changed, 17 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Tue Sep 04 15:49:51 2001 +0000
+++ b/src/w32fns.c	Tue Sep 04 17:35:24 2001 +0000
@@ -3351,7 +3351,7 @@
   FRAME_W32_WINDOW (f) = hwnd
     = CreateWindow (EMACS_CLASS,
 		    f->namebuf,
-		    f->output_data.w32->dwStyle | WS_CLIPCHILDREN,
+		    f->output_data.w32->dwStyle,
 		    f->output_data.w32->left_pos,
 		    f->output_data.w32->top_pos,
 		    rect.right - rect.left,
@@ -4062,9 +4062,10 @@
           release_frame_dc (f, hdc);
 
 #if defined (W32_DEBUG_DISPLAY)
-          DebPrint (("WM_ERASEBKGND: erasing %d,%d-%d,%d\n",
-                     wmsg.rect.left, wmsg.rect.top, wmsg.rect.right,
-                     wmsg.rect.bottom));
+          DebPrint (("WM_ERASEBKGND (frame %p): erasing %d,%d-%d,%d\n",
+		     f,
+                     wmsg.rect.left, wmsg.rect.top,
+		     wmsg.rect.right, wmsg.rect.bottom));
 #endif /* W32_DEBUG_DISPLAY */
 	}
       return 1;
@@ -4084,6 +4085,13 @@
   	PAINTSTRUCT paintStruct;
         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
            fails.  Apparently this can happen under some
            circumstances.  */
@@ -4101,9 +4109,11 @@
 	      wmsg.rect = paintStruct.rcPaint;
 
 #if defined (W32_DEBUG_DISPLAY)
-            DebPrint (("WM_PAINT: painting %d,%d-%d,%d\n", wmsg.rect.left,
-                       wmsg.rect.top, wmsg.rect.right, wmsg.rect.bottom));
-            DebPrint (("WM_PAINT: update region is %d,%d-%d,%d\n",
+            DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",
+		       f,
+		       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.right, update_rect.bottom));
 #endif