Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2008-06-13 20:51:03 +0000
committerGrant Gayed2008-06-13 20:51:03 +0000
commitd482d3ac5db20fa051bd067d7f91f3fa9cbb9993 (patch)
tree7a8de7e792e59c1d4b4bedbe1e51d213c8216344
parent547d0e37fc9b69e3531148516f988f182aecbbcd (diff)
downloadeclipse.platform.swt-d482d3ac5db20fa051bd067d7f91f3fa9cbb9993.tar.gz
eclipse.platform.swt-d482d3ac5db20fa051bd067d7f91f3fa9cbb9993.tar.xz
eclipse.platform.swt-d482d3ac5db20fa051bd067d7f91f3fa9cbb9993.zip
fix setBounds
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java1
2 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index eece063376..9a81a05264 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -2663,9 +2663,9 @@ public static void setAppName (String name) {
//TODO use custom timer instead of timerExec
Runnable hoverTimer = new Runnable () {
public void run () {
- if (currentControl != null && currentControl != null) {
+ if (currentControl != null && !currentControl.isDisposed()) {
currentControl.sendMouseEvent (null, SWT.MouseHover, trackingControl != null);
- }
+ }
}
};
//TODO - use custom timer instead of timerExec
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index 9514c2b5f9..0f7e81e680 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
@@ -1007,6 +1007,7 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean resiz
} else {
if (resize) {
NSRect rect = window.frame();
+ rect.y += rect.height - height;
rect.width = width;
rect.height = height;
window.setFrame_display_(rect, false);

Back to the top