From feb7a76223bbdd5689849a23c6b738d677cb6395 Mon Sep 17 00:00:00 2001 From: kmcclusk Date: Thu, 18 Jun 1998 00:58:10 +0000 Subject: [PATCH] Added generation of NS_PAINT event after a NS_SIZE event. --- widget/src/motif/nsXtEventHandler.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/widget/src/motif/nsXtEventHandler.cpp b/widget/src/motif/nsXtEventHandler.cpp index 0eeb7c6d4386..d65c7080f2b2 100644 --- a/widget/src/motif/nsXtEventHandler.cpp +++ b/widget/src/motif/nsXtEventHandler.cpp @@ -143,6 +143,7 @@ void nsXtWidget_ExposureMask_EventHandler(Widget w, XtPointer p, XEvent * event, pevent.rect = (nsRect *)▭ XEvent xev; +#if 0 int count = 0; while (XPeekEvent(XtDisplay(w), &xev)) { @@ -155,6 +156,7 @@ void nsXtWidget_ExposureMask_EventHandler(Widget w, XtPointer p, XEvent * event, break; } } +#endif widgetWindow->OnPaint(pevent); @@ -517,7 +519,8 @@ extern XtAppContext gAppContext; if (! widgetWindow->GetResized()) { printf("Adding timeout for %d\n", widgetWindow); - XtAppAddTimeOut(gAppContext, 100, (XtTimerCallbackProc)nsXtWidget_Refresh_Callback, widgetWindow); + XSync(XtDisplay(w), 0); + XtAppAddTimeOut(gAppContext, 500, (XtTimerCallbackProc)nsXtWidget_Refresh_Callback, widgetWindow); } widgetWindow->SetResizeRect(rect); @@ -612,4 +615,12 @@ void nsXtWidget_Refresh_Callback(XtPointer call_data) widgetWindow->SetBounds(bounds); widgetWindow->OnResize(event); widgetWindow->SetResized(PR_FALSE); + + + nsPaintEvent pevent; + pevent.message = NS_PAINT; + pevent.widget = widgetWindow; + pevent.time = 0; + pevent.rect = (nsRect *)&bounds; + widgetWindow->OnPaint(pevent); }