summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--src/lib/elm_cnp_helper.c2
-rw-r--r--src/lib/elm_entry.c33
3 files changed, 11 insertions, 25 deletions
diff --git a/AUTHORS b/AUTHORS
index 8df9a5c0d..8aec86f2a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,3 +13,4 @@ Brian Wang <brian.wang.0721@gmail.com>
13Mike Blumenkrantz (zmike) <mike@zentific.com> 13Mike Blumenkrantz (zmike) <mike@zentific.com>
14Saumsung Electronics <tbd> 14Saumsung Electronics <tbd>
15Samsung SAIT <tbd> 15Samsung SAIT <tbd>
16Brett Nash <nash@nash.id.au>
diff --git a/src/lib/elm_cnp_helper.c b/src/lib/elm_cnp_helper.c
index af8927b10..220b79331 100644
--- a/src/lib/elm_cnp_helper.c
+++ b/src/lib/elm_cnp_helper.c
@@ -138,7 +138,7 @@ elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
138 sel->active = 1; 138 sel->active = 1;
139 sel->widget = widget; 139 sel->widget = widget;
140 sel->set(elm_win_xwindow_get(elm_widget_top_get(widget)), 140 sel->set(elm_win_xwindow_get(elm_widget_top_get(widget)),
141 &selection, sizeof(void *)); 141 &selection, sizeof(int));
142 sel->format = format; 142 sel->format = format;
143 sel->selbuf = strdup(selbuf); 143 sel->selbuf = strdup(selbuf);
144 return true; 144 return true;
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 51c293ccb..cdcf3cfbe 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -925,23 +925,17 @@ _signal_selection_start(void *data, Evas_Object *obj __UNUSED__, const char *emi
925 } 925 }
926 wd->have_selection = EINA_TRUE; 926 wd->have_selection = EINA_TRUE;
927 evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL); 927 evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL);
928#ifdef HAVE_ELEMENTARY_X
928 if (wd->sel_notify_handler) 929 if (wd->sel_notify_handler)
929 { 930 {
930 char *txt = _mkup_to_text(elm_entry_selection_get(data)); 931 char *txt = elm_entry_selection_get(data);
931 932 Evas_Object *top;
932 if (txt)
933 {
934#ifdef HAVE_ELEMENTARY_X
935 Evas_Object *top;
936 933
937 top = elm_widget_top_get(data); 934 top = elm_widget_top_get(data);
938 if ((top) && (elm_win_xwindow_get(top))) 935 if ((top) && (elm_win_xwindow_get(top)))
939 ecore_x_selection_primary_set(elm_win_xwindow_get(top), txt, 936 elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP, txt);
940 strlen(txt));
941#endif
942 free(txt);
943 }
944 } 937 }
938#endif
945} 939}
946 940
947static void 941static void
@@ -972,17 +966,8 @@ _signal_selection_cleared(void *data, Evas_Object *obj __UNUSED__, const char *e
972 966
973 top = elm_widget_top_get(data); 967 top = elm_widget_top_get(data);
974 if ((top) && (elm_win_xwindow_get(top))) 968 if ((top) && (elm_win_xwindow_get(top)))
975 { 969 elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP,
976 char *t; 970 wd->cut_sel);
977
978 t = _mkup_to_text(wd->cut_sel);
979 if (t)
980 {
981 ecore_x_selection_primary_set(elm_win_xwindow_get(top),
982 t, strlen(t));
983 free(t);
984 }
985 }
986#endif 971#endif
987 eina_stringshare_del(wd->cut_sel); 972 eina_stringshare_del(wd->cut_sel);
988 wd->cut_sel = NULL; 973 wd->cut_sel = NULL;