]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/selection.c
[svn-upgrade] Integrating new upstream version, ion3 (20070902)
[ion3.git] / ioncore / selection.c
index 1ebbb43be3070c5e13be04b3a070bee342be5d09..c93742a7d75d7909cb3c983439f952e72674d14e 100644 (file)
@@ -42,7 +42,6 @@ void ioncore_handle_selection_request(XSelectionRequestEvent *ev)
     bool ok=FALSE;
     
     sev.property=None;
-    sev.target=None;
     
     if(selection_data==NULL || ev->property==None)
         goto refuse;
@@ -72,7 +71,6 @@ void ioncore_handle_selection_request(XSelectionRequestEvent *ev)
     
     if(ok){
         XSetTextProperty(ioncore_g.dpy, ev->requestor, &prop, ev->property);
-        sev.target=ev->target;
         sev.property=ev->property;
         XFree(prop.value);
     }
@@ -81,6 +79,7 @@ refuse:
     sev.type=SelectionNotify;
     sev.requestor=ev->requestor;
     sev.selection=ev->selection;
+    sev.target=ev->target;
     sev.time=ev->time;
     XSendEvent(ioncore_g.dpy, ev->requestor, False, 0L, (XEvent*)&sev);
 }