summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT AWT
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2005-01-20 22:39:51 +0000
committerSilenio Quarti <silenio>2005-01-20 22:39:51 +0000
commit80cbdf5537b3141c180b026fdf21ef20cbe166d3 (patch)
treee12cf8267cab0129ca9e4bfc2374afe91aa88cd3 /bundles/org.eclipse.swt/Eclipse SWT AWT
parent67bb76f403d7d314c32aebd85e26d69b1f7802d7 (diff)
downloadeclipse.platform.swt-80cbdf5537b3141c180b026fdf21ef20cbe166d3.tar.gz
eclipse.platform.swt-80cbdf5537b3141c180b026fdf21ef20cbe166d3.tar.xz
eclipse.platform.swt-80cbdf5537b3141c180b026fdf21ef20cbe166d3.zip
82837
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT AWT')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
index 195cd1643c..0b1c15a0ba 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
@@ -49,15 +49,10 @@ public class SWT_AWT {
*/
public static String embeddedFrameClass;
- static final boolean JDK1_3;
static boolean loaded, swingInitialized;
static Object menuSelectionManager;
static Method clearSelectionPath;
-static {
- JDK1_3 = "1.3".equals(System.getProperty("java.specification.version"));
-}
-
static native final int getAWTHandle (Canvas canvas);
static synchronized void loadLibrary () {
@@ -173,7 +168,7 @@ public static Frame new_Frame (final Composite parent) {
public void handleEvent (Event e) {
EventQueue.invokeLater(new Runnable () {
public void run () {
- if (JDK1_3) {
+ if (Library.JAVA_VERSION >= Library.JAVA_VERSION(1, 4, 0)) {
frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
} else {
@@ -188,17 +183,19 @@ public static Frame new_Frame (final Composite parent) {
public void handleEvent (Event e) {
EventQueue.invokeLater(new Runnable () {
public void run () {
- if (JDK1_3) {
+ if (Library.JAVA_VERSION >= Library.JAVA_VERSION(1, 4, 0)) {
frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
} else {
frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_LOST_FOCUS));
frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
}
- if (menuSelectionManager != null && clearSelectionPath != null) {
- try {
- clearSelectionPath.invoke(menuSelectionManager, new Object[0]);
- } catch (Throwable e) {}
+ if (Library.JAVA_VERSION >= Library.JAVA_VERSION(1, 4, 2)) {
+ if (menuSelectionManager != null && clearSelectionPath != null) {
+ try {
+ clearSelectionPath.invoke(menuSelectionManager, new Object[0]);
+ } catch (Throwable e) {}
+ }
}
}
});