From: Hyoyoung Chang Date: Wed, 15 Sep 2010 13:48:43 +0000 (+0900) Subject: add checking selection type X-Git-Tag: 2.0_alpha~295 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=716155b4f812d81aed9de70347e57acb18b659bc;p=framework%2Fuifw%2Fcbhm.git add checking selection type --- diff --git a/src/clipdrawer.c b/src/clipdrawer.c index c84b8cd..a3cf06d 100644 --- a/src/clipdrawer.c +++ b/src/clipdrawer.c @@ -46,15 +46,16 @@ static void _list_click( void *data, Evas_Object *obj, void *event_info ) elm_list_item_selected_set(it, 0); char *p = NULL; - char *cpdata = NULL; +// char *cpdata = NULL; int clen; - cpdata = elm_list_item_label_get(it); +// cpdata = elm_list_item_label_get(it); + char *cpdata = "#en#"; if (cpdata == NULL) return; clen = strlen(cpdata); p = malloc(clen + 1); - snprintf(p, clen, "%s", cpdata); + snprintf(p, clen+1, "%s", cpdata); elm_selection_set(1, obj, /*mark up*/1, p); clipdrawer_lower_view(ad); diff --git a/src/xcnphandler.c b/src/xcnphandler.c index ac64799..b9050e4 100755 --- a/src/xcnphandler.c +++ b/src/xcnphandler.c @@ -63,6 +63,7 @@ static int _init_atoms() { /* all atoms are global variables */ atomPrimary = XA_PRIMARY; + atomSecondary = XA_SECONDARY; atomTarget = XA_STRING; atomClipboard = XInternAtom(g_disp, ATOM_CLIPBOARD_NAME, False); atomCBHM = XInternAtom (g_disp, ATOM_CLIPBOARD_MANAGER_NAME, False); @@ -337,6 +338,9 @@ static int _xsel_clear_cb(void *data, int ev_type, void *event) struct appdata *ad = data; Ecore_X_Event_Selection_Clear *ev = (Ecore_X_Event_Selection_Clear *)event; + + if (ev->selection != ECORE_X_SELECTION_CLIPBOARD) + return TRUE; DTRACE("SelectionClear\n"); @@ -352,6 +356,9 @@ static int _xsel_clear_cb(void *data, int ev_type, void *event) static int _xsel_request_cb(void *data, int ev_type, void *event) { Ecore_X_Event_Selection_Request *ev = (Ecore_X_Event_Selection_Request *)event; + + if (ev->selection != atomClipboard) + return TRUE; DTRACE("SelectionRequest\n"); @@ -366,6 +373,9 @@ static int _xsel_notify_cb(void *data, int ev_type, void *event) Ecore_X_Event_Selection_Notify *ev = (Ecore_X_Event_Selection_Notify *)event; Ecore_X_Selection_Data_Text *text_data = NULL; + + if (ev->selection != ECORE_X_SELECTION_CLIPBOARD) + return TRUE; DTRACE("SelectionNotify\n"); diff --git a/src/xcnphandler.h b/src/xcnphandler.h index f039964..9ea42ae 100755 --- a/src/xcnphandler.h +++ b/src/xcnphandler.h @@ -46,6 +46,7 @@ static Ecore_X_Window g_evtwin = None; /* all atoms are global variables */ static Atom atomPrimary; +static Atom atomSecondary; static Atom atomTarget; static Atom atomClipboard; static Atom atomCBHM;