Enlightenment CVS committal Author : rephorm Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: ecore_x_events.c ecore_x_selection.c ecore_xcb_events.c Log Message: if we can't convert to the requested target, fail so that requesting app can re-request a different type fix broken logic (!foo == -1) is always false =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -3 -r1.95 -r1.96 --- ecore_x_events.c 4 Apr 2007 11:43:29 -0000 1.95 +++ ecore_x_events.c 21 Apr 2007 02:57:51 -0000 1.96 @@ -1136,7 +1136,7 @@ if (!ecore_x_selection_convert(xevent->xselectionrequest.selection, xevent->xselectionrequest.target, - &data) == -1) + &data)) { /* Refuse selection, conversion to requested target failed */ property = None; =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_selection.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- ecore_x_selection.c 19 Dec 2006 06:40:30 -0000 1.34 +++ ecore_x_selection.c 21 Apr 2007 02:57:51 -0000 1.35 @@ -477,11 +477,15 @@ } } - /* Default, just return the data */ + /* ICCCM says "If the selection cannot be converted into a form based on the target (and parameters, if any), the owner should refuse the SelectionRequest as previously described." */ + return 0; + + /* Default, just return the data *data_ret = malloc(sel->length); memcpy(*data_ret, sel->data, sel->length); free(tgt_str); return 1; + */ } /* TODO: We need to work out a mechanism for automatic conversion to any requested =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_xcb_events.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ecore_xcb_events.c 13 Apr 2007 17:12:09 -0000 1.1 +++ ecore_xcb_events.c 21 Apr 2007 02:57:51 -0000 1.2 @@ -1317,7 +1317,7 @@ (sd->win == ev->owner)) { if (!ecore_x_selection_convert(ev->selection, ev->target, - &data) == -1) + &data)) { /* Refuse selection, conversion to requested target failed */ sn_event.property = XCB_NONE; ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs