Fix for bug 129168. Don't call ForceRedraw() when already processing an update event. sr=beard.

git-svn-id: svn://10.0.0.236/trunk@116187 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bnesse%netscape.com
2002-03-08 21:29:58 +00:00
parent 121c854382
commit 697feb2d9d
3 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
Changes since 1.0b1:
1. Fixed code that was causing recursive painting calls.
Changes since 1.0d8:
1. Unescape file:// URLs when processing them. This allows us to launch local applets when there

View File

@@ -786,13 +786,15 @@ NS_METHOD MRJPluginInstance::SetWindow(nsPluginWindow* pluginWindow)
NS_METHOD MRJPluginInstance::HandleEvent(nsPluginEvent* pluginEvent, PRBool* eventHandled)
{
*eventHandled = PR_TRUE;
Boolean isUpdate;
if (pluginEvent != NULL) {
EventRecord* event = pluginEvent->event;
// Check for coordinate/clipping changes.
// Too bad nsPluginEventType_ClippingChangedEvent events aren't implemented.
inspectInstance();
isUpdate = (event->what == updateEvt);
inspectInstance(isUpdate);
if (event->what == nullEvent) {
// Give MRJ another quantum of time.
@@ -917,8 +919,8 @@ MRJSession* MRJPluginInstance::getSession()
return mSession;
}
void MRJPluginInstance::inspectInstance()
void MRJPluginInstance::inspectInstance(Boolean isUpdateEvt)
{
if (mContext != NULL && mContext->inspectWindow() && mWindowlessPeer != NULL)
if (mContext != NULL && mContext->inspectWindow() && !isUpdateEvt && mWindowlessPeer != NULL)
mWindowlessPeer->ForceRedraw();
}

View File

@@ -463,7 +463,7 @@ public:
private:
void pushInstance(void);
void popInstance(void);
void inspectInstance(void);
void inspectInstance(Boolean isUpdateEvt);
private:
nsIPluginInstancePeer* mPeer;