From: Jan Djärv Date: Thu, 19 Oct 2006 07:17:42 +0000 (+0000) Subject: * xselect.c (x_handle_selection_request): If the converted_selection X-Git-Tag: emacs-pretest-22.0.90~73 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=866f85184a7d583883f1d1dd4ce2d1d8dbf77884;p=emacs.git * xselect.c (x_handle_selection_request): If the converted_selection is NIL or XCDR (converted_selection) is NIL, decline the request. --- diff --git a/src/ChangeLog b/src/ChangeLog index ce3c7d1435b..9b33d6c2d70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-10-19 Jan Dj,Ad(Brv + + * 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,Ad(Brv * gtkutil.c (get_utf8_string): Remove warnings with casts. diff --git a/src/xselect.c b/src/xselect.c index 013a52dbdb1..022226946a9 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -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: