Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2001-09-10 22:10:55 +0000
committerSteve Northover2001-09-10 22:10:55 +0000
commit480d82b9d8b93f2a0d871039fe5adcaaa45ec044 (patch)
tree18672e55f043778b3de44de2ba97e6a065374235 /bundles
parent13ac69c3d3ea70d1b64a8e1f6b0fdc24f74b91c0 (diff)
downloadeclipse.platform.swt-480d82b9d8b93f2a0d871039fe5adcaaa45ec044.tar.gz
eclipse.platform.swt-480d82b9d8b93f2a0d871039fe5adcaaa45ec044.tar.xz
eclipse.platform.swt-480d82b9d8b93f2a0d871039fe5adcaaa45ec044.zip
*** empty log message ***
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index c2c1ab9b48..316c114574 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -1079,11 +1079,19 @@ public void moveAbove (Control control) {
checkWidget ();
int hwndAfter = OS.HWND_TOP;
if (control != null) {
- if (control.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
+ if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
int hwnd = control.handle;
- if ((hwnd == 0) || (hwnd == handle)) return;
+ if (hwnd == 0 || hwnd == handle) return;
hwndAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
- if (hwndAfter == 0) hwndAfter = OS.HWND_TOP;
+ /*
+ * Bug in Windows. For some reason, when GetWindow ()
+ * with GW_HWNDPREV is used to query the previous window
+ * in the z-order with the first child, Windows returns
+ * the first child instead of NULL. The fix is to detect
+ * this case and return because the window is already the
+ * first child in the z-order.
+ */
+ if (hwndAfter == 0 || hwndAfter == handle) return;
}
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos (handle, hwndAfter, 0, 0, 0, 0, flags);

Back to the top