Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2002-01-31 21:57:33 +0000
committerSteve Northover2002-01-31 21:57:33 +0000
commita1c542b09812445de8fc8cfbf51c243877c46d09 (patch)
tree199b9a31a0a7f33f0e9311b86b2a8acee22f2f25
parent5d6c8208629922fa8cd36b0d3a68c3e57119239e (diff)
downloadeclipse.platform.swt-a1c542b09812445de8fc8cfbf51c243877c46d09.tar.gz
eclipse.platform.swt-a1c542b09812445de8fc8cfbf51c243877c46d09.tar.xz
eclipse.platform.swt-a1c542b09812445de8fc8cfbf51c243877c46d09.zip
*** empty log message ***
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java41
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java2
2 files changed, 25 insertions, 18 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 5084c862b4..fef3a30ab9 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
@@ -453,9 +453,8 @@ public Point getLocation () {
*/
public boolean getMaximized () {
checkWidget ();
- if (!OS.IsWinCE) {
- if (OS.IsWindowVisible (handle)) return OS.IsZoomed (handle);
- }
+ if (OS.IsWinCE) return swFlags == OS.SW_SHOWMAXIMIZED;
+ if (OS.IsWindowVisible (handle)) return OS.IsZoomed (handle);
return swFlags == OS.SW_SHOWMAXIMIZED;
}
@@ -615,23 +614,31 @@ void saveFocus () {
}
void setBounds (int x, int y, int width, int height, int flags) {
- if (!OS.IsWinCE) {
+ if (OS.IsWinCE) {
+ super.setBounds (x, y, width, height, flags);
+ }
+ if (OS.IsIconic (handle) || OS.IsZoomed (handle)) {
+ WINDOWPLACEMENT lpwndpl = new WINDOWPLACEMENT ();
+ lpwndpl.length = WINDOWPLACEMENT.sizeof;
+ OS.GetWindowPlacement (handle, lpwndpl);
+ lpwndpl.showCmd = OS.SW_SHOWNA;
if (OS.IsIconic (handle)) {
- WINDOWPLACEMENT lpwndpl = new WINDOWPLACEMENT ();
- lpwndpl.length = WINDOWPLACEMENT.sizeof;
- OS.GetWindowPlacement (handle, lpwndpl);
- lpwndpl.showCmd = 0;
- if ((flags & OS.SWP_NOMOVE) == 0) {
- lpwndpl.left = x;
- lpwndpl.top = y;
- }
- if ((flags & OS.SWP_NOSIZE) == 0) {
- lpwndpl.right = x + width;
- lpwndpl.bottom = y + height;
+ lpwndpl.showCmd = OS.SW_SHOWMINNOACTIVE;
+ } else {
+ if (OS.IsZoomed (handle)) {
+ lpwndpl.showCmd = OS.SW_SHOWMAXIMIZED;
}
- OS.SetWindowPlacement (handle, lpwndpl);
- return;
}
+ if ((flags & OS.SWP_NOMOVE) == 0) {
+ lpwndpl.left = x;
+ lpwndpl.top = y;
+ }
+ if ((flags & OS.SWP_NOSIZE) == 0) {
+ lpwndpl.right = x + width;
+ lpwndpl.bottom = y + height;
+ }
+ OS.SetWindowPlacement (handle, lpwndpl);
+ return;
}
super.setBounds (x, y, width, height, flags);
}
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 c167e7b15c..46067ede78 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
@@ -712,7 +712,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
}
}
} else {
- if (OS.IsIconic (handle)) {
+ if (OS.IsIconic (handle) || OS.IsZoomed (handle)) {
super.setBounds (x, y, width, height, flags);
return;
}

Back to the top