Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu2005-01-26 21:37:22 +0000
committerChristophe Cornu2005-01-26 21:37:22 +0000
commit730383938344c8db63a066870828ce1e9edbaeff (patch)
tree42aae9ed76667f2dc00d0e60ab0dbe3ece2eba0a
parent617caa16607996fc0c177bb61875b51fc5b46c90 (diff)
downloadeclipse.platform.swt-730383938344c8db63a066870828ce1e9edbaeff.tar.gz
eclipse.platform.swt-730383938344c8db63a066870828ce1e9edbaeff.tar.xz
eclipse.platform.swt-730383938344c8db63a066870828ce1e9edbaeff.zip
57068 comment 8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java
index 8a8843287f..9492a63d1d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java
@@ -309,6 +309,17 @@ public Browser(Composite parent, int style) {
break;
}
case NewWindow2: {
+ /*
+ * Feature in Internet Explorer. If the NewWindow2 event
+ * is not handled, Internet Explorer opens a new standalone
+ * instance, as documented in MSDN. The workaround is to
+ * default to Cancel true before dispatching the WindowEvent
+ * to the application since the application handler could
+ * throw an exception.
+ */
+ Variant cancel = event.arguments[1];
+ int pCancel = cancel.getByRef();
+ COM.MoveMemory(pCancel, new short[]{COM.VARIANT_TRUE}, 2);
WindowEvent newEvent = new WindowEvent(Browser.this);
newEvent.display = getDisplay();
newEvent.widget = Browser.this;
@@ -331,8 +342,6 @@ public Browser(Composite parent, int style) {
//variant.dispose();
//iDispatch.Release();
}
- Variant cancel = event.arguments[1];
- int pCancel = cancel.getByRef();
COM.MoveMemory(pCancel, new short[]{doit ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2);
break;
}
@@ -476,8 +485,7 @@ public Browser(Composite parent, int style) {
size.x = arg1.getInt();
break;
}
- }
-
+ }
/*
* Dispose all arguments passed in the OleEvent. This must be
* done to properly release any IDispatch reference that was

Back to the top