summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT AWT
diff options
context:
space:
mode:
authorSteve Northover <steve>2003-05-20 16:22:07 +0000
committerSteve Northover <steve>2003-05-20 16:22:07 +0000
commit1c811e22387ce3eb60e49e994250d21a4cb36131 (patch)
treea54c45d8da10d74dc955bc4e9d7cba3a2b79e772 /bundles/org.eclipse.swt/Eclipse SWT AWT
parent6a322e714ea3c15d977e9abf1dea6e24584a12af (diff)
downloadeclipse.platform.swt-1c811e22387ce3eb60e49e994250d21a4cb36131.tar.gz
eclipse.platform.swt-1c811e22387ce3eb60e49e994250d21a4cb36131.tar.xz
eclipse.platform.swt-1c811e22387ce3eb60e49e994250d21a4cb36131.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT AWT')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/internal/awt/win32/SWT_AWT.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/internal/awt/win32/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/internal/awt/win32/SWT_AWT.java
index aa245982fa..7aa41226e8 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/internal/awt/win32/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/internal/awt/win32/SWT_AWT.java
@@ -72,14 +72,24 @@ public static Panel new_Panel (final Composite parent) {
frame.add (panel);
parent.addListener (SWT.Activate, new Listener () {
public void handleEvent (Event e) {
- frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
- frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
+ /* Needed to fix focus for lightweights in JDK 1.3.1 */
+ EventQueue.invokeLater(new Runnable () {
+ public void run () {
+ frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ACTIVATED));
+ frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_GAINED));
+ }
+ });
}
});
parent.addListener (SWT.Deactivate, new Listener () {
public void handleEvent (Event e) {
- frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
- frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
+ /* Needed to fix focus for lightweights in JDK 1.3.1 */
+ EventQueue.invokeLater(new Runnable () {
+ public void run () {
+ frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEACTIVATED));
+ frame.dispatchEvent (new FocusEvent (frame, FocusEvent.FOCUS_LOST));
+ }
+ });
}
});
parent.getShell ().addListener (SWT.Move, new Listener () {