COMBO: fix bug that popup list disappears when the text is pressed
authorHyunJong Park <paulhj.park@samsung.com>
Fri, 10 Jun 2016 09:36:35 +0000 (18:36 +0900)
committerSangho Park <sangho.p@samsung.com>
Mon, 13 Jun 2016 01:14:40 +0000 (10:14 +0900)
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 <paulhj.park@samsung.com>
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/OriginalCCombo.java

index 090693e..7ef9fd4 100644 (file)
@@ -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;
                }