sel->active = 1;
sel->widget = widget;
sel->set(elm_win_xwindow_get(elm_widget_top_get(widget)),
- &selection, sizeof(void *));
+ &selection, sizeof(int));
sel->format = format;
sel->selbuf = strdup(selbuf);
return true;
}
wd->have_selection = EINA_TRUE;
evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL);
+#ifdef HAVE_ELEMENTARY_X
if (wd->sel_notify_handler)
{
- char *txt = _mkup_to_text(elm_entry_selection_get(data));
-
- if (txt)
- {
-#ifdef HAVE_ELEMENTARY_X
- Evas_Object *top;
+ char *txt = elm_entry_selection_get(data);
+ Evas_Object *top;
- top = elm_widget_top_get(data);
- if ((top) && (elm_win_xwindow_get(top)))
- ecore_x_selection_primary_set(elm_win_xwindow_get(top), txt,
- strlen(txt));
-#endif
- free(txt);
- }
+ top = elm_widget_top_get(data);
+ if ((top) && (elm_win_xwindow_get(top)))
+ elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP, txt);
}
+#endif
}
static void
top = elm_widget_top_get(data);
if ((top) && (elm_win_xwindow_get(top)))
- {
- char *t;
-
- t = _mkup_to_text(wd->cut_sel);
- if (t)
- {
- ecore_x_selection_primary_set(elm_win_xwindow_get(top),
- t, strlen(t));
- free(t);
- }
- }
+ elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP,
+ wd->cut_sel);
#endif
eina_stringshare_del(wd->cut_sel);
wd->cut_sel = NULL;