diff src/xselect.c @ 73427:842c20ea5853

* xselect.c (x_handle_selection_request): If the converted_selection is NIL or XCDR (converted_selection) is NIL, decline the request.
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 19 Oct 2006 07:17:42 +0000
parents 237fcefd8610
children 05ce1bcd673e 034f67f59091 7eeafaaa9eab
line wrap: on
line diff
--- a/src/xselect.c	Thu Oct 19 07:16:27 2006 +0000
+++ b/src/xselect.c	Thu Oct 19 07:17:42 2006 +0000
@@ -956,6 +956,12 @@
       Atom type;
       int nofree;
 
+      if (CONSP (converted_selection) && NILP (XCDR (converted_selection)))
+        {
+          x_decline_selection_request (event);
+          goto DONE2;
+        }
+
       lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event),
 				   converted_selection,
 				   &data, &type, &size, &format, &nofree);
@@ -971,6 +977,8 @@
       if (!nofree)
 	xfree (data);
     }
+
+ DONE2:
   unbind_to (count, Qnil);
 
  DONE: