Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2016-12-14 22:13:51 +0000
committerMarkus Keller2017-02-08 20:06:15 +0000
commit46408b87ce5bd4a3a8f198bea810396f4f192699 (patch)
tree9638ef4bf5c6e3e3fe2e7c92a87ee56e453468ca
parente1787c8fcdffbd94d468bb2b316df2248295a0fe (diff)
downloadeclipse.platform.swt-46408b87ce5bd4a3a8f198bea810396f4f192699.tar.gz
eclipse.platform.swt-46408b87ce5bd4a3a8f198bea810396f4f192699.tar.xz
eclipse.platform.swt-46408b87ce5bd4a3a8f198bea810396f4f192699.zip
Bug 491627: [win32] Rollover tooltip on TreeItem brings Shell to frontM20170212-0800
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index cf800971b0..13d1726e78 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -1951,6 +1951,18 @@ LRESULT wmNotify (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
if ((bits & OS.WS_EX_TOPMOST) != 0) break;
} while (true);
if (hwndParent != 0) break;
+ /*
+ * Bug in Windows. TTN_SHOW is sent for inactive shells. When
+ * SetWindowPos is called as a reaction, inactive shells can
+ * wrongly end up on top. The fix is to swallow such requests.
+ *
+ * A visible effect is that spurious tool tips can show up and
+ * disappear in a split second. This is a mostly harmless
+ * feature that can also be observed in the Windows Explorer.
+ * See bug 491627 for more details.
+ */
+ if (display.getActiveShell () == null) return LRESULT.ONE;
+
display.lockActiveWindow = true;
int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOSIZE;
long /*int*/ hwndInsertAfter = hdr.code == OS.TTN_SHOW ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST;

Back to the top