Revert "elm_entry: show context menu when entry is longpressed without focusing"
authorThiep Ha <thiep.ha@samsung.com>
Mon, 26 Dec 2016 03:17:07 +0000 (12:17 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:12 +0000 (14:37 +0900)
This reverts commit 5eb41281c87b4f4d8e10cec140a21bc65ffd8cdf.
The commit causes the context menu show when entry does not
have focus: http://suprem.sec.samsung.net/jira/browse/TSAM-12196

Change-Id: Ib22b0cb2b334d368fd24bb27e09b8e513342f090

src/lib/elm_entry.c
src/modules/copypasteUI_ctxpopup/copypaste.c

index ce78b479978f3d5a20f6fcd4aab8ccbdb4a2624a..fd0f30391df6084fc98171dcda6c260e52f5adf4 100644 (file)
@@ -2923,6 +2923,10 @@ _long_press_cb(void *data)
    ELM_ENTRY_DATA_GET(data, sd);
 
    // TIZEN ONLY: START ////////////////////////////////////////////
+   if (!elm_widget_focus_get(data))
+     {
+        goto signal_longpress;
+     }
    // 20150229: Add drag feature.
    Eina_Bool hit_selection = EINA_FALSE;
 
index 56daa579e36546314ea21374c9aa9c10ea1c1937..28b3ad54e4ce5f1d69e65223f38da6fb7ffad3cb 100644 (file)
@@ -1246,7 +1246,8 @@ obj_longpress(Evas_Object *obj)
    if (ext_mod->viewport_rect)
      eina_rectangle_free(ext_mod->viewport_rect);
    elm_entry_extension_module_data_get(obj, ext_mod);
-   if (ext_mod->context_menu)
+   has_focused = elm_widget_focus_get(obj);
+   if (ext_mod->context_menu && has_focused)
      {
         Eina_List *lao = NULL;
         Evas_Object *ao = NULL;