Merged branch JAVADEV_PR3_20001002 into trunk.

git-svn-id: svn://10.0.0.236/trunk@82247 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-11-02 23:33:21 +00:00
parent 19a05b26cb
commit aee4ebbf93
71 changed files with 1537 additions and 521 deletions

View File

@@ -183,13 +183,15 @@ void PlugletEngine::StartJVM() {
("PlugletEngine::StartJVM we got already started JVM\n"));
return;
}
char classpath[1024];
char classpath[1024]="";
JavaVMInitArgs vm_args;
JavaVMOption options[2];
sprintf(classpath, "-Djava.class.path=%s",PR_GetEnv("CLASSPATH"));
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletEngine::StartJVM about to create JVM classpath=%s\n",classpath));
char * classpathEnv = PR_GetEnv("CLASSPATH");
if (classpath != NULL) {
sprintf(classpath, "-Djava.class.path=%s",classpathEnv);
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletEngine::StartJVM about to create JVM classpath=%s\n",classpath));
}
options[0].optionString = classpath;
options[1].optionString=""; //-Djava.compiler=NONE";
vm_args.version = 0x00010002;

View File

@@ -179,7 +179,7 @@ int PlugletFactory::Compare(const char *mimeType) {
char *p1 = mimeDescription;
char *p2 = strchr(p1,';');
while ( p1 != NULL && p1 < terminator ) {
size_t n = sizeof(char) * ( ( (p2 == NULL) ? terminator : p2) - p1 );
size_t n = sizeof(char) * ( ( (p2 == NULL || p2 > terminator) ? terminator : p2) - p1 );
if (PL_strncasecmp(p1,mimeType,n) == 0) {
return 1;
}

View File

@@ -28,12 +28,6 @@
#include <Xm/PushB.h>
#include <Xm/DrawingA.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <gdksuperwin.h>
#include <gtkmozbox.h>
#include "PlugletViewMotif.h"
#include "PlugletEngine.h"
@@ -67,6 +61,10 @@ static Colormap awt_cmap;
static Visual * awt_visual;
static int awt_num_colors;
static void (*AwtLock)(JNIEnv *);
static void (*AwtUnLock)(JNIEnv *);
static void (*AwtNoFlushUnLock)(JNIEnv *);
void PlugletViewMotif::Initialize() {
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletViewMotif.Initialize\n"));
@@ -83,6 +81,7 @@ void PlugletViewMotif::Initialize() {
return;
}
getAwtData(&awt_depth, &awt_cmap, &awt_visual, &awt_num_colors, NULL);
getAwtLockFunctions(&AwtLock, &AwtUnLock, &AwtNoFlushUnLock,NULL);
}
PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
@@ -100,7 +99,7 @@ PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
|| !win->window) {
if (win && !win->window) {
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletViewMotif.SetWindow win->window = NULL. We have a bug in plugin module. this=%p\n",this));
("PlugletViewMotif.SetWindow win->window = NULL. We have a bug in plugin module. this=%p\n",this));
}
if (frame) {
env->DeleteGlobalRef(frame);
@@ -112,30 +111,16 @@ PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
}
return PR_FALSE;
}
GdkSuperWin * superWin = (GdkSuperWin *) win->window;
Window parentWindowID;
Window rootWindowID;
Window * childrenWindowIDs;
unsigned int numberOfChildren;
int containerWindowID = GDK_WINDOW_XWINDOW(superWin->shell_window);
Status status = XQueryTree(GDK_DISPLAY(), containerWindowID,
&rootWindowID, &parentWindowID,
&childrenWindowIDs, & numberOfChildren);
if (numberOfChildren >= 1) {
containerWindowID = childrenWindowIDs[0];
}
if (WindowID == containerWindowID) {
return PR_FALSE;
}
WindowID = containerWindowID;
void (*AwtLock)(JNIEnv *);
void (*AwtUnLock)(JNIEnv *);
void (*AwtNoFlushUnLock)(JNIEnv *);
getAwtLockFunctions(&AwtLock, &AwtUnLock, &AwtNoFlushUnLock,NULL);
AwtLock(env);
int containerWindowID = win->window;
printf("containerWindowID=%d WindowID=%d\n",containerWindowID, WindowID);
#if 0
if (WindowID == containerWindowID) {
printf("about to return false\n");
return PR_FALSE;
}
#endif
WindowID = containerWindowID;
Display *awt_display = getAwtDisplay();
XSync(awt_display, FALSE);
Arg args[40];