summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-08-08 20:06:14 +0000
committerVeronika Irvine <veronika>2003-08-08 20:06:14 +0000
commitdd8992109fa30bb57d880152a45ce27990ec959b (patch)
tree086f81203f470145b16448e30037f4fc734ca752
parente02a0d1804fe51e384deff8fc1d1c7d76c883b35 (diff)
downloadeclipse.platform.swt-dd8992109fa30bb57d880152a45ce27990ec959b.tar.gz
eclipse.platform.swt-dd8992109fa30bb57d880152a45ce27990ec959b.tar.xz
eclipse.platform.swt-dd8992109fa30bb57d880152a45ce27990ec959b.zip
bug 41347
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index 76e49f934f..dc6d41a0a2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
@@ -341,24 +341,14 @@ void dropDown (boolean drop) {
text.setFocus();
return;
}
+
int index = list.getSelectionIndex ();
if (index != -1) list.setTopIndex (index);
Display display = getDisplay ();
Rectangle listRect = list.getBounds ();
Rectangle parentRect = display.map (getParent (), null, getBounds());
Point comboSize = getSize ();
- Rectangle displayRect = display.getClientArea();
- // Get Monitor for CCombo widget
- Monitor[] monitors = display.getMonitors ();
- if (monitors.length > 1) {
- for (int i = 0; i < monitors.length; i++) {
- Rectangle monitorRect = monitors[i].getClientArea();
- if (monitorRect.contains(parentRect.x, parentRect.y)) {
- displayRect = monitorRect;
- break;
- }
- }
- }
+ Rectangle displayRect = getMonitor().getClientArea();
int width = Math.max (comboSize.x, listRect.width + 2);
int height = listRect.height + 2;
int x = parentRect.x;
@@ -679,9 +669,6 @@ void listEvent (Event event) {
case SWT.MouseUp: {
if (event.button != 1) return;
dropDown (false);
- Event e = new Event();
- e.time = event.time;
- notifyListeners(SWT.DefaultSelection, e);
break;
}
case SWT.Selection: {