aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xselect.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 537be2ddd54..f2a64dd9534 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -795,6 +795,7 @@ x_handle_selection_request (struct selection_input_event *event)
795 Window requestor = SELECTION_EVENT_REQUESTOR (event); 795 Window requestor = SELECTION_EVENT_REQUESTOR (event);
796 Lisp_Object multprop; 796 Lisp_Object multprop;
797 ptrdiff_t j, nselections; 797 ptrdiff_t j, nselections;
798 struct selection_data cs;
798 799
799 if (property == None) goto DONE; 800 if (property == None) goto DONE;
800 multprop 801 multprop
@@ -811,11 +812,19 @@ x_handle_selection_request (struct selection_input_event *event)
811 Lisp_Object subtarget = AREF (multprop, 2*j); 812 Lisp_Object subtarget = AREF (multprop, 2*j);
812 Atom subproperty = symbol_to_x_atom (dpyinfo, 813 Atom subproperty = symbol_to_x_atom (dpyinfo,
813 AREF (multprop, 2*j+1)); 814 AREF (multprop, 2*j+1));
815 bool subsuccess = false;
814 816
815 if (subproperty != None) 817 if (subproperty != None)
816 x_convert_selection (selection_symbol, subtarget, 818 subsuccess = x_convert_selection (selection_symbol, subtarget,
817 subproperty, true, dpyinfo); 819 subproperty, true, dpyinfo);
820 if (!subsuccess)
821 ASET (multprop, 2*j+1, Qnil);
818 } 822 }
823 /* Save conversion results */
824 lisp_data_to_selection_data (dpyinfo, multprop, &cs);
825 XChangeProperty (dpyinfo->display, requestor, property,
826 cs.type, cs.format, PropModeReplace,
827 cs.data, cs.size);
819 success = true; 828 success = true;
820 } 829 }
821 else 830 else