summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2006-03-16 19:21:13 +0000
committerSilenio Quarti <silenio>2006-03-16 19:21:13 +0000
commita3475902f992476f3d47823b959e2bf9bb614247 (patch)
treebd0cfe4fec60e849a2aa875ec202e3a02f7d5b1e
parentfa405fd1fda974bc21f6737451c9906f36c5ae2a (diff)
downloadeclipse.platform.swt-a3475902f992476f3d47823b959e2bf9bb614247.tar.gz
eclipse.platform.swt-a3475902f992476f3d47823b959e2bf9bb614247.tar.xz
eclipse.platform.swt-a3475902f992476f3d47823b959e2bf9bb614247.zip
116975 - SWT_AWT bridge with JDialog cannot use Tab within dialog. focus is lost (findControl going up Shells)
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 5932514dbf..6950170d55 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -1005,10 +1005,13 @@ boolean filterMessage (MSG msg) {
Control findControl (int handle) {
if (handle == 0) return null;
+ int hwndOwner = 0;
do {
Control control = getControl (handle);
if (control != null) return control;
- } while ((handle = OS.GetParent (handle)) != 0);
+ hwndOwner = OS.GetWindow (handle, OS.GW_OWNER);
+ handle = OS.GetParent (handle);
+ } while (handle != 0 && handle != hwndOwner);
return null;
}