Windows bustage fix for bug 500889.

This commit is contained in:
Josh Aas 2009-06-29 15:38:09 -04:00
parent becd2c6e8f
commit 4cf18dc361

View File

@ -2516,7 +2516,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::ForceRedraw()
}
NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
{
{
if (!mOwner) {
NS_WARNING("plugin owner has no owner in getting doc's window handle");
return NS_ERROR_FAILURE;
@ -2573,17 +2573,18 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
return NS_OK;
}
}
}
#endif
// simply return the document window
nsCOMPtr<nsIWidget> widget;
nsresult rv = vm->GetWidget(getter_AddRefs(widget));
if (widget) {
*pvalue = (void*)widget->GetNativeData(NS_NATIVE_WINDOW);
} else {
NS_ASSERTION(widget, "couldn't get doc's widget in getting doc's window handle");
}
// simply return the document window
nsCOMPtr<nsIWidget> widget;
nsresult rv = vm->GetWidget(getter_AddRefs(widget));
if (widget) {
*pvalue = (void*)widget->GetNativeData(NS_NATIVE_WINDOW);
} else {
NS_ASSERTION(widget, "couldn't get doc's widget in getting doc's window handle");
}
return rv;
return rv;
#elif defined(MOZ_WIDGET_GTK2)
// X11 window managers want the toplevel window for WM_TRANSIENT_FOR.
nsIWidget* win = mOwner->GetWindow();