Ecore_Event_Handler *sel_notify_handler;
Ecore_Event_Handler *sel_clear_handler;
Ecore_Timer *longpress_timer;
+ /* Only for clipboard */
const char *cut_sel;
const char *text;
Evas_Coord lastw;
top = elm_widget_top_get(data);
if ((top) && (elm_win_xwindow_get(top)))
{
- ecore_x_selection_primary_request
+ ecore_x_selection_clipboard_request
(elm_win_xwindow_get(top),
ECORE_X_SELECTION_TARGET_UTF8_STRING);
wd->selection_asked = EINA_TRUE;
if (!wd) return;
sel = edje_object_part_text_selection_get(wd->ent, "elm.text");
elm_selection_set(seltype, obj, ELM_SEL_MARKUP, sel);
- eina_stringshare_replace(&wd->cut_sel, sel);
+ if (seltype == ELM_SEL_CLIPBOARD)
+ eina_stringshare_replace(&wd->cut_sel, sel);
}
static void
#ifdef HAVE_ELEMENTARY_X
if (wd->sel_notify_handler)
{
- char *txt = elm_entry_selection_get(data);
+ const char *txt = elm_entry_selection_get(data);
Evas_Object *top;
top = elm_widget_top_get(data);
top = elm_widget_top_get(data);
if ((top) && (elm_win_xwindow_get(top)))
- ecore_x_selection_primary_clear();
+ elm_selection_clear(ELM_SEL_PRIMARY, data);
#endif
}
}
_signal_entry_cut_notify(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
Widget_Data *wd = elm_widget_data_get(data);
- char *txt;
if (!wd) return;
evas_object_smart_callback_call(data, SIG_SELECTION_CUT, NULL);
elm_selection_set(ELM_SEL_CLIPBOARD, obj, ELM_SEL_MARKUP,
Ecore_X_Event_Selection_Notify *ev = event;
if (!wd) return 1;
if (!wd->selection_asked) return 1;
-
+
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
{
elm_entry_select_none(data);
}
return 1;*/
+ return 1;
}
#endif