mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 03:18:41 +00:00
Added generation of NS_PAINT event after a NS_SIZE event.
This commit is contained in:
parent
17b23aaf6e
commit
feb7a76223
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user