From d08d6ca12bb8a762b9a20e154f586901b1d7fa48 Mon Sep 17 00:00:00 2001 From: HyunJong Park Date: Fri, 10 Jun 2016 18:36:35 +0900 Subject: [PATCH] COMBO: fix bug that popup list disappears when the text is pressed When the text in combo is pressed and then the combo is focused out (e.g. if the parent component is focused, the combo is focused out), the popup list of combo disappears. Change-Id: I6b2ad0f45e9f027a9a8732a3c5104689b7976949 Signed-off-by: HyunJong Park --- .../common/org/eclipse/swt/custom/OriginalCCombo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/OriginalCCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/OriginalCCombo.java index 090693e..7ef9fd4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/OriginalCCombo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/OriginalCCombo.java @@ -1178,6 +1178,17 @@ void listEvent (Event event) { if (!comboShellActivated) dropDown (false); break; } + /* Tizen */ + /* + * When the text is pressed with the popup list visible. + */ + Point textPoint = text.toControl(getDisplay().getCursorLocation()); + Point textSize = text.getSize(); + Rectangle textRect = new Rectangle(0, 0, textSize.x, textSize.y); + if (textRect.contains(textPoint)) { + break; + } + /* ===== */ dropDown (false); break; } -- 2.7.4