diff options
author | Steve Northover <steve> | 2006-09-21 20:21:51 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2006-09-21 20:21:51 +0000 |
commit | c922c7880d59121536798e9c5bbcf53ce8c0e290 (patch) | |
tree | af20a9400b72d44d0635a5578dcb7e7fbaad3bbf | |
parent | 0fea110bd834b20cb5a34643d3bbc358189a9e14 (diff) | |
download | eclipse.platform.swt-c922c7880d59121536798e9c5bbcf53ce8c0e290.tar.gz eclipse.platform.swt-c922c7880d59121536798e9c5bbcf53ce8c0e290.tar.xz eclipse.platform.swt-c922c7880d59121536798e9c5bbcf53ce8c0e290.zip |
9953 - When the window is launched Maximized, it doesn't
3 files changed, 22 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java index cb4c556171..0b23ff7ce3 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java @@ -1329,7 +1329,12 @@ public void setVisible (boolean visible) { display.removeBar (menuBar); OS.DrawMenuBar (handle); } - OS.ShowWindow (handle, swFlags); + STARTUPINFO lpStartUpInfo = Display.lpStartupInfo; + if (lpStartUpInfo != null && (lpStartUpInfo.dwFlags & OS.STARTF_USESHOWWINDOW) != 0) { + OS.ShowWindow (handle, lpStartUpInfo.wShowWindow); + } else { + OS.ShowWindow (handle, swFlags); + } } if (isDisposed ()) return; opened = true; 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 c7e283180a..f1ed104590 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 @@ -132,6 +132,16 @@ public class Display extends Device { } } + /* Startup info */ + static STARTUPINFO lpStartupInfo; + static { + if (!OS.IsWinCE) { + lpStartupInfo = new STARTUPINFO (); + lpStartupInfo.cb = STARTUPINFO.sizeof; + OS.GetStartupInfo (lpStartupInfo); + } + } + /* Focus */ int focusEvent; Control focusControl; @@ -2999,6 +3009,7 @@ void postEvent (Event event) { */ public boolean readAndDispatch () { checkDevice (); + lpStartupInfo = null; drawMenuBars (); runPopups (); if (OS.PeekMessage (msg, 0, 0, 0, OS.PM_REMOVE)) { 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 a9c2e36fb7..9c338cf4dc 100755 --- 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 @@ -1019,8 +1019,11 @@ int hwndMDIClient () { */ public void open () { checkWidget (); - bringToTop (); - if (isDisposed ()) return; + STARTUPINFO lpStartUpInfo = Display.lpStartupInfo; + if (lpStartUpInfo == null || (lpStartUpInfo.dwFlags & OS.STARTF_USESHOWWINDOW) == 0) { + bringToTop (); + if (isDisposed ()) return; + } /* * Feature on WinCE PPC. A new application becomes * the foreground application only if it has at least |