aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Kinnunen2014-05-07 05:56:54 (EDT)
committerTimo Kinnunen2014-05-07 09:52:03 (EDT)
commit60f75aaa96fc1ca05d8b25931ac7df826a0de4f1 (patch)
tree40cb4681c490406e87b7a81a266eb9e5cbeb9c15
parenta43c04c97ceffe2b12039d4c052d72e59a0568dd (diff)
downloadeclipse.platform.swt-60f75aaa96fc1ca05d8b25931ac7df826a0de4f1.zip
eclipse.platform.swt-60f75aaa96fc1ca05d8b25931ac7df826a0de4f1.tar.gz
eclipse.platform.swt-60f75aaa96fc1ca05d8b25931ac7df826a0de4f1.tar.bz2
Bug 433958 - [win32] Minimizing a Shell doesn't make some otherrefs/changes/15/26115/2
application's window active Fixed the bug in WM_SYSCOMMAND by limiting an old workaround to only apply to Windows versions prior to Vista. Also fixed another version check in WM_ERASEBKGND to apply its workaround to only Windows Vista like its accompanying comment says. Change-Id: Id956ecca9d950923a765853fb36d75cdd117b7a4 Signed-off-by: Timo Kinnunen <timo.kinnunen@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index 24b082f..d598c28 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2224,7 +2224,7 @@ LRESULT WM_ERASEBKGND (long /*int*/ wParam, long /*int*/ lParam) {
*
* NOTE: This only happens on Vista.
*/
- if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+ if (!OS.IsWinCE && OS.WIN32_VERSION == OS.VERSION (6, 0)) {
drawBackground (wParam);
return LRESULT.ONE;
}
@@ -2539,8 +2539,14 @@ LRESULT WM_SYSCOMMAND (long /*int*/ wParam, long /*int*/ lParam) {
* top-level window in the Z-order while ShowWindow()
* with SW_SHOWMINIMIZED does not. There is no fix for
* this at this time.
+ *
+ * NOTE: Second guessing the effectiveness of the
+ * operating system's memory manager and breaking UI
+ * convention if the JVM has reserved over 32MB
+ * of memory is not necessary on more recent Windows
+ * versions like Windows Vista.
*/
- if (OS.IsWinNT) {
+ if (OS.IsWinNT && OS.WIN32_VERSION < OS.VERSION (6, 0)) {
int cmd = (int)/*64*/wParam & 0xFFF0;
switch (cmd) {
case OS.SC_MINIMIZE: