copypaste: consider when the clipboard is launched by keypad 29/92529/1
authorWooHyun Jung <wh0705.jung@samsung.com>
Mon, 17 Oct 2016 08:58:06 +0000 (17:58 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 17 Oct 2016 08:58:06 +0000 (17:58 +0900)
When the clipboard is launched by keypad, not by cnp-popup,
clipboard_proxy should be updated from elm_entry by using
extension_module_data_get.
Additionally, I remove comparison between obj and caller,
because caller is not updated with this case.

Change-Id: I02b1def19a6c8fd3b87deb8056704894ac0a2ed3

src/modules/copypasteUI_ctxpopup/copypaste.c

index 0166e16..2a27eba 100644 (file)
@@ -1032,10 +1032,11 @@ _translate_menu(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_
 
 #ifdef HAVE_ELEMENTARY_WAYLAND
 Eldbus_Proxy*
-cbhm_proxy_get()
+cbhm_proxy_get(Evas_Object *obj)
 {
-   if (!ext_mod)
-      return NULL;
+   if (!obj || !ext_mod) return NULL;
+
+   elm_entry_extension_module_data_get(obj, ext_mod);
    return ext_mod->cbhm_proxy;
 }
 #endif
@@ -1791,12 +1792,11 @@ obj_popup_showing_get(Evas_Object *obj)
 EAPI void
 obj_hide_clipboard(Evas_Object *obj)
 {
-   if ((!obj) || (!ext_mod) || (obj != ext_mod->caller))
-     return;
+   if (!obj || !ext_mod) return;
 
 #ifdef HAVE_ELEMENTARY_WAYLAND
    EINA_LOG_ERR("CbhmHide proxy call");
-   eldbus_proxy_call(cbhm_proxy_get(), "CbhmHide", NULL, NULL, -1, "");
+   eldbus_proxy_call(cbhm_proxy_get(obj), "CbhmHide", NULL, NULL, -1, "");
 #else
    _cbhm_msg_send(obj, "cbhm_hide");
 #endif