diff options
author | Steve Northover <steve> | 2007-02-02 16:21:16 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2007-02-02 16:21:16 +0000 |
commit | 0032ecb8246f320b54cd7303d48dcf8c37a0a448 (patch) | |
tree | 2afa528f2897a95b22baa4fd531643bfe88b0179 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java | |
parent | 1edced90fd40e70cfe7a835cfcac24c9b70c23ac (diff) | |
download | eclipse.platform.swt-0032ecb8246f320b54cd7303d48dcf8c37a0a448.tar.gz eclipse.platform.swt-0032ecb8246f320b54cd7303d48dcf8c37a0a448.tar.xz eclipse.platform.swt-0032ecb8246f320b54cd7303d48dcf8c37a0a448.zip |
Added a Control equality check to Display.map()
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index d666244b03..daea9ed3fe 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -2584,6 +2584,7 @@ public Point map (Control from, Control to, int x, int y) { if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); Point point = new Point (x, y); + if (from == to) return point; if (from != null) { int /*long*/ window = from.eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; @@ -2709,6 +2710,7 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); Rectangle rect = new Rectangle (x, y, width, height); + if (from == to) return rect; if (from != null) { int /*long*/ window = from.eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; |