]> code.delx.au - gnu-emacs/commitdiff
* xselect.c (x_handle_selection_request): If the converted_selection
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 19 Oct 2006 07:17:42 +0000 (07:17 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 19 Oct 2006 07:17:42 +0000 (07:17 +0000)
 is NIL or XCDR (converted_selection) is NIL, decline the request.

src/ChangeLog
src/xselect.c

index ce3c7d1435b146fbdb25c1d8bfc863606d528978..9b33d6c2d70102aee41e3dc710e081529493e074 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-19  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * xselect.c (x_handle_selection_request): If the converted_selection
+       is NIL or XCDR (converted_selection) is NIL, decline the request.
+
 2006-10-16  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * gtkutil.c (get_utf8_string): Remove warnings with casts.
index 013a52dbdb15806578ddf5f1a8061df9d7e92e98..022226946a926f89d898c6eda5b1d49d0dbafaba 100644 (file)
@@ -956,6 +956,12 @@ x_handle_selection_request (event)
       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 @@ x_handle_selection_request (event)
       if (!nofree)
        xfree (data);
     }
+
+ DONE2:
   unbind_to (count, Qnil);
 
  DONE: