Fixing 18568, addidng some QT specific stuff to avoid build errors, patch by johng@corel.com, sr=brendan, r=pollmann a=av

This commit is contained in:
av%netscape.com 2000-11-30 22:01:45 +00:00
parent 23c14b3014
commit bb2df1a0d2
2 changed files with 28 additions and 8 deletions

View File

@ -96,7 +96,11 @@
#include "nsCExternalHandlerService.h"
#ifdef XP_UNIX
#if defined(MOZ_WIDGET_GTK)
#include <gdk/gdkx.h> // for GDK_DISPLAY()
#elif defined(MOZ_WIDGET_QT)
#include <qwindowdefs.h> // 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();
}

View File

@ -96,7 +96,11 @@
#include "nsCExternalHandlerService.h"
#ifdef XP_UNIX
#if defined(MOZ_WIDGET_GTK)
#include <gdk/gdkx.h> // for GDK_DISPLAY()
#elif defined(MOZ_WIDGET_QT)
#include <qwindowdefs.h> // 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();
}