diff options
author | Veronika Irvine <veronika> | 2004-01-07 20:57:29 +0000 |
---|---|---|
committer | Veronika Irvine <veronika> | 2004-01-07 20:57:29 +0000 |
commit | 6a317df17180612d0cadc5ba7acd92ce8c2fe23a (patch) | |
tree | 095f54da059ec955766ba26c1a918347d313f762 /bundles/org.eclipse.swt/Eclipse SWT | |
parent | 761860366d606e3cd4f94e05017feff9792a90ab (diff) | |
download | eclipse.platform.swt-6a317df17180612d0cadc5ba7acd92ce8c2fe23a.tar.gz eclipse.platform.swt-6a317df17180612d0cadc5ba7acd92ce8c2fe23a.tar.xz eclipse.platform.swt-6a317df17180612d0cadc5ba7acd92ce8c2fe23a.zip |
forceResize before GetClientRect
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT')
5 files changed, 6 insertions, 5 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 7c6859a39f..fb42c0458f 100755 --- 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 @@ -806,6 +806,7 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (result != null) return result; if ((state & CANVAS) != 0) { + forceResize (); RECT rect = new RECT (); OS.GetClientRect (handle, rect); if ((style & SWT.NO_BACKGROUND) == 0) { 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 8d2e889f83..cad3ddb07b 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 @@ -615,11 +615,7 @@ public Point getSize () { return new Point (width, height); } } - RECT rect = new RECT (); - OS.GetWindowRect (handle, rect); - int width = rect.right - rect.left; - int height = rect.bottom - rect.top; - return new Point (width, height); + return super.getSize (); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java index 07ef2217e6..be843fa5c7 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java @@ -1515,6 +1515,7 @@ public void showSelection () { int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0); if (count == 0) return; int height = OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0); + forceResize (); RECT rect = new RECT (); OS.GetClientRect (handle, rect); int topIndex = OS.SendMessage (handle, OS.LB_GETTOPINDEX, 0, 0); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java index 3692c449e1..0fbfa026d2 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java @@ -200,6 +200,7 @@ public void dispose () { * Not currently used. */ Rectangle getBounds () { + parent.forceResize (); RECT rect = new RECT (); OS.GetClientRect (parent.handle, rect); int x = 0, y = 0, width, height; @@ -362,6 +363,7 @@ public int getSelection () { */ public Point getSize () { checkWidget(); + parent.forceResize (); RECT rect = new RECT (); OS.GetClientRect (parent.handle, rect); int width, height; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java index 905c28c705..c24a3d2edb 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java @@ -1173,6 +1173,7 @@ void showItem (int hItem) { RECT itemRect = new RECT (); itemRect.left = hItem; if (OS.SendMessage (handle, OS.TVM_GETITEMRECT, 1, itemRect) != 0) { + forceResize (); RECT rect = new RECT (); OS.GetClientRect (handle, rect); POINT pt = new POINT (); |