--- a/WinWorkstation.st Wed Nov 19 20:19:37 2003 +0100
+++ b/WinWorkstation.st Fri Nov 21 15:16:36 2003 +0100
@@ -486,6 +486,8 @@
# define UNHANDLED_EVENT_PRINTF(x) /* */
#endif
+/* # define EVENT_PRINTF(x) { printf x;} */
+
#define INFOPRINT(__x__) \
if (@global(InfoPrinting) == true) { \
fprintf __x__; \
@@ -2171,6 +2173,8 @@
* 0, if no event was generated, -1 if none was generated with error.
* if a region is passed in, it is not destroyed.
*/
+
+
static int
__generateExposes(hWnd, hRgnInOrNull, msgType, doClear)
HWND hWnd;
@@ -2187,7 +2191,10 @@
char bytes[512];
} data;
- wantExpose = (GetWindow_eventMask(hWnd) & ExposureMask);
+ wantExpose = 0;
+
+ if( msgType >= 0 )
+ wantExpose = (GetWindow_eventMask(hWnd) & ExposureMask);
if (hRgnInOrNull) {
updRgn = hRgnInOrNull;
@@ -2252,6 +2259,12 @@
__clearRectangles(hWnd, numRects, pRect);
}
+#ifndef PRE_21_NOV
+ for (i=0; i < numRects; i++) {
+ ValidateRect( hWnd, &pRect[i] );
+ }
+#endif
+
#ifdef DEBUG_COLORIZE_WM_PAINT_RECTS1
{
HDC hDC;
@@ -2897,6 +2910,12 @@
if (isNative) {
return 0;
}
+
+#ifndef PRE_21_NOV
+ *pDefault = 0;
+ return 0;
+#else
+
if (GetWindow_flag(hWnd) & LI_INPUTWIN) {
*pDefault = 0;
return 0;
@@ -2905,27 +2924,35 @@
*pDefault = 0;
return 0;
}
-#if 0
- /*
- * seems to solve the activate-no-update problem,
- * but leads to double-repaint ...
- */
- __generateExposes(hWnd, NULL, WM_PAINT, 1);
+
+ /* THIS_WORKS */
*pDefault = 0;
return 0;
-#endif
- /* THIS_WORKS */
- *pDefault = 0;
-return 0;
- return 1;
- break;
+
+#endif /* ! PRE_21_NOV */
case WM_PAINT:
- EVENT_PRINTF(("WM_PAINT\n"));
+ EVENT_PRINTF(("WM_PAINT ********************* "));
if (isNative) {
return 0;
}
+#ifndef PRE_21_NOV
+ { int n;
+
+ n = __generateExposes( hWnd, NULL, WM_PAINT, 0 );
+
+ if( n <= 0 ) {
+ * pDefault = 1;
+ return 0;
+ }
+ * pDefault = 0;
+ return n;
+ }
+#else
+
+
+
if (GetWindow_flag(hWnd) & LI_INPUTWIN) {
*pDefault = 0;
return 0;
@@ -2961,6 +2988,8 @@
}
return 0;
+#endif /* ! PRE_21_NOV */
+
case WM_SIZE:
EVENT_PRINTF(("WM_SIZE\n"));
/*
@@ -9984,9 +10013,16 @@
fprintf(stderr, "oops - WM_MOUSEENTER for unmapping\n");
}
#endif
-#if WM_PAINT_CLEAR_LATE
+
+#ifndef PRE_21_NOV
__clearWindow(hWnd, x, y, w, h);
-#endif
+#else
+# if WM_PAINT_CLEAR_LATE
+ __clearWindow(hWnd, x, y, w, h);
+# endif
+
+#endif
+
#ifdef DEBUG_COLORIZE_WM_PAINT_RECTS2
{
HDC hDC;
@@ -15458,6 +15494,6 @@
!WinWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.234 2003-10-31 08:56:25 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.235 2003-11-21 14:16:36 ca Exp $'
! !
WinWorkstation initialize!