Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        ecore_x_events.c 


Log Message:
Boom, Copy & Paste all works now


===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ecore_x_events.c    14 Jan 2004 04:43:51 -0000      1.14
+++ ecore_x_events.c    14 Jan 2004 05:18:43 -0000      1.15
@@ -878,18 +878,15 @@
 void
 _ecore_x_event_handle_selection_request(XEvent *xevent)
 {
-   Ecore_X_Event_Selection_Request  *e;
    Ecore_X_Selection_Data           *sd;
    XSelectionEvent                  xnotify;
    XEvent                           *xev;
    char                             *data;
 
-   e = calloc(1, sizeof(Ecore_X_Event_Selection_Request));
-   e->win = xevent->xselectionrequest.requestor;
-   e->time = xevent->xselectionrequest.time;
-
    xev = calloc(1, sizeof(XEvent));
    
+   xnotify.type = SelectionNotify;
+   xnotify.display = xevent->xselectionrequest.display;
    xnotify.requestor = xevent->xselectionrequest.requestor;
    xnotify.selection = xevent->xselectionrequest.selection;
    xnotify.target = xevent->xselectionrequest.target;
@@ -898,7 +895,8 @@
    if((sd = _ecore_x_selection_get(xnotify.selection)) 
          && (sd->win == xevent->xselectionrequest.owner))
    {
-      /* FIXME: Provide API for user-defined conversion functions */
+      /* TODO: Use predefined/user-definable callback functions
+       * to convert selections */
       if (xnotify.target == _ecore_x_atom_string)
          data = ecore_x_selection_convert_to_string(sd->data);
       else if (xnotify.target == _ecore_x_atom_utf8_string)
@@ -907,7 +905,7 @@
          data = sd->data;
       
       /* FIXME: This does not properly handle large data transfers */
-      ecore_x_window_prop_property_set(e->win,
+      ecore_x_window_prop_property_set(xevent->xselectionrequest.requestor,
             xevent->xselectionrequest.property,
             xevent->xselectionrequest.target,
             8, data, sd->length);
@@ -920,9 +918,9 @@
    }
    
    xev->xselection = xnotify;
-   XSendEvent(_ecore_x_disp, e->win, False, 0, xev);
-   /* FIXME: We alloc e but we never actually add it to the event
-    * queue -- should it be freed or is it still useful? */
+   XSendEvent(xevent->xselectionrequest.display, 
+              xevent->xselectionrequest.requestor, False, 0, xev);
+   XFree(xev);
    
 }
 




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to