* src/xterm.c (x_error_handler): Clear fail->selection_serial
after reporting an error during selection transfer, in case any
other outstanding requests within the protected section also
report errors.
/* If a selection transfer is the cause of this error,
remove the selection transfer now. */
+
if (fail->selection_serial)
- x_handle_selection_error (fail->selection_serial,
- event);
+ {
+ x_handle_selection_error (fail->selection_serial,
+ event);
+
+ /* Clear selection_serial to prevent
+ x_handle_selection_error from being called again if
+ any more requests within the protected section cause
+ errors to be reported. */
+ fail->selection_serial = 0;
+ }
return 0;
}