From bb2df1a0d2c7d9f37215e8a3c626d16b61f4e348 Mon Sep 17 00:00:00 2001 From: "av%netscape.com" Date: Thu, 30 Nov 2000 22:01:45 +0000 Subject: [PATCH] Fixing 18568, addidng some QT specific stuff to avoid build errors, patch by johng@corel.com, sr=brendan, r=pollmann a=av --- modules/plugin/base/src/nsPluginHostImpl.cpp | 18 ++++++++++++++---- modules/plugin/nglsrc/nsPluginHostImpl.cpp | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp index 0872a0a2c3bf..c51e5929ef13 100644 --- a/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -96,7 +96,11 @@ #include "nsCExternalHandlerService.h" #ifdef XP_UNIX +#if defined(MOZ_WIDGET_GTK) #include // for GDK_DISPLAY() +#elif defined(MOZ_WIDGET_QT) +#include // for qt_xdisplay() +#endif #endif // We need this hackery so that we can dynamically register doc @@ -1519,11 +1523,15 @@ NS_IMETHODIMP nsPluginHostImpl::GetValue(nsPluginManagerVariable aVariable, void #ifdef XP_UNIX if (nsPluginManagerVariable_XDisplay == aVariable) { Display** value = NS_REINTERPRET_CAST(Display**, aValue); - *value = GDK_DISPLAY(); - if (!(*value)) { - return NS_ERROR_FAILURE; - } +#if defined(MOZ_WIDGET_GTK) + *value = GDK_DISPLAY(); +#elif defined(MOZ_WIDGET_QT) + *value = qt_xdisplay(); +#endif + if (!(*value)) { + return NS_ERROR_FAILURE; } + } #endif return rv; } @@ -1534,6 +1542,8 @@ nsresult nsPluginHostImpl::ReloadPlugins(PRBool reloadPages) // we should. Otherwise LoadPlugins will add the same plugins to the list // XXX for new-style plugins, we should also call nsIComponentManager::AutoRegister() mPluginsLoaded = PR_FALSE; + + // load them again return LoadPlugins(); } diff --git a/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/modules/plugin/nglsrc/nsPluginHostImpl.cpp index 0872a0a2c3bf..c51e5929ef13 100644 --- a/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -96,7 +96,11 @@ #include "nsCExternalHandlerService.h" #ifdef XP_UNIX +#if defined(MOZ_WIDGET_GTK) #include // for GDK_DISPLAY() +#elif defined(MOZ_WIDGET_QT) +#include // for qt_xdisplay() +#endif #endif // We need this hackery so that we can dynamically register doc @@ -1519,11 +1523,15 @@ NS_IMETHODIMP nsPluginHostImpl::GetValue(nsPluginManagerVariable aVariable, void #ifdef XP_UNIX if (nsPluginManagerVariable_XDisplay == aVariable) { Display** value = NS_REINTERPRET_CAST(Display**, aValue); - *value = GDK_DISPLAY(); - if (!(*value)) { - return NS_ERROR_FAILURE; - } +#if defined(MOZ_WIDGET_GTK) + *value = GDK_DISPLAY(); +#elif defined(MOZ_WIDGET_QT) + *value = qt_xdisplay(); +#endif + if (!(*value)) { + return NS_ERROR_FAILURE; } + } #endif return rv; } @@ -1534,6 +1542,8 @@ nsresult nsPluginHostImpl::ReloadPlugins(PRBool reloadPages) // we should. Otherwise LoadPlugins will add the same plugins to the list // XXX for new-style plugins, we should also call nsIComponentManager::AutoRegister() mPluginsLoaded = PR_FALSE; + + // load them again return LoadPlugins(); }