mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +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 *)▭
|
pevent.rect = (nsRect *)▭
|
||||||
XEvent xev;
|
XEvent xev;
|
||||||
|
|
||||||
|
#if 0
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (XPeekEvent(XtDisplay(w), &xev))
|
while (XPeekEvent(XtDisplay(w), &xev))
|
||||||
{
|
{
|
||||||
@ -155,6 +156,7 @@ void nsXtWidget_ExposureMask_EventHandler(Widget w, XtPointer p, XEvent * event,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
widgetWindow->OnPaint(pevent);
|
widgetWindow->OnPaint(pevent);
|
||||||
|
|
||||||
@ -517,7 +519,8 @@ extern XtAppContext gAppContext;
|
|||||||
|
|
||||||
if (! widgetWindow->GetResized()) {
|
if (! widgetWindow->GetResized()) {
|
||||||
printf("Adding timeout for %d\n", widgetWindow);
|
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);
|
widgetWindow->SetResizeRect(rect);
|
||||||
@ -612,4 +615,12 @@ void nsXtWidget_Refresh_Callback(XtPointer call_data)
|
|||||||
widgetWindow->SetBounds(bounds);
|
widgetWindow->SetBounds(bounds);
|
||||||
widgetWindow->OnResize(event);
|
widgetWindow->OnResize(event);
|
||||||
widgetWindow->SetResized(PR_FALSE);
|
widgetWindow->SetResized(PR_FALSE);
|
||||||
|
|
||||||
|
|
||||||
|
nsPaintEvent pevent;
|
||||||
|
pevent.message = NS_PAINT;
|
||||||
|
pevent.widget = widgetWindow;
|
||||||
|
pevent.time = 0;
|
||||||
|
pevent.rect = (nsRect *)&bounds;
|
||||||
|
widgetWindow->OnPaint(pevent);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user