diff --git a/widget/src/mac/nsWindow.cpp b/widget/src/mac/nsWindow.cpp index 01a9c6f49501..5bd68b6464bb 100644 --- a/widget/src/mac/nsWindow.cpp +++ b/widget/src/mac/nsWindow.cpp @@ -526,8 +526,7 @@ nsSizeEvent event; event.windowSize = &mBounds; event.eventStructType = NS_SIZE_EVENT; event.widget = this; - this->DispatchEvent(&event); - return NS_OK; + return ( this->DispatchEvent(&event) ); } @@ -561,8 +560,7 @@ nsSizeEvent event; event.windowSize = &mBounds; event.widget = this; event.eventStructType = NS_SIZE_EVENT; - this->DispatchEvent(&event); - return NS_OK; + return (this->DispatchEvent(&event) ); } @@ -941,7 +939,7 @@ PRBool nsWindow::ConvertStatus(nsEventStatus aStatus) // Invokes callback and ProcessEvent method on Event Listener object // //------------------------------------------------------------------------- -PRBool nsWindow::DispatchEvent(nsGUIEvent* event) +NS_IMETHODIMP nsWindow::DispatchEvent(nsGUIEvent* event) { PRBool result = PR_FALSE; event->widgetSupports = this; @@ -974,7 +972,7 @@ PRBool nsWindow::DispatchMouseEvent(nsMouseEvent &aEvent) // call the event callback if (nsnull != mEventCallback) { - result = DispatchEvent(&aEvent); + result = (DispatchEvent(&aEvent)==NS_OK); return result; } @@ -1092,7 +1090,7 @@ nsRect rr; SetPort(theport); event.renderingContext->Init(mContext, this); - result = DispatchEvent(&event); + result = (DispatchEvent(&event)==NS_OK); NS_RELEASE(event.renderingContext); } else diff --git a/widget/src/mac/nsWindow.h b/widget/src/mac/nsWindow.h index e3bd9c7756ec..12f67e16cdb7 100644 --- a/widget/src/mac/nsWindow.h +++ b/widget/src/mac/nsWindow.h @@ -112,7 +112,7 @@ public: NS_IMETHOD EndResizingChildren(void); static PRBool ConvertStatus(nsEventStatus aStatus); - virtual PRBool DispatchEvent(nsGUIEvent* event); + NS_IMETHOD DispatchEvent(nsGUIEvent* event); virtual PRBool DispatchMouseEvent(nsMouseEvent &aEvent); NS_IMETHOD OnDestroy();