]> git.eshelyaron.com Git - emacs.git/commit
Speed up handling X selection requests
authorPo Lu <luangruo@yahoo.com>
Thu, 1 Dec 2022 06:33:23 +0000 (14:33 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 1 Dec 2022 06:33:34 +0000 (14:33 +0800)
commite961a31507e6fba86a5d45fec7fa616e80028882
treeefd4b82ed3cc4c8accf0aed6ece55614e2605c03
parent65468109a53c605df991f72521de5ed3b63ba6b8
Speed up handling X selection requests

* etc/NEWS: Announce speedup.
* src/alloc.c (garbage_collect): Call mark_xselect.
* src/xftfont.c (xftfont_end_for_frame): Fix crash on display IO
error.
* src/xselect.c (struct selection_data, struct transfer): New
structures.
(outstading_transfers): New variable.
(SELECTED_EVENTS, x_selection_request_lisp_error): Stop checking
cs->nofree.
(x_catch_errors_unwind): Delete function.
(c_size_for_format, x_size_for_format, selection_data_for_offset)
(selection_data_size, transfer_selecting_event)
(x_continue_selection_transfer, x_remove_selection_transfers)
(x_selection_transfer_timeout): New functions.
(x_reply_selection_request): When handling selection requests,
never wait for property notifications synchronously.  Instead,
write out the selection data as the client reads it from the
event loop.
(x_handle_selection_request, x_convert_selection)
(x_handle_property_notify, x_get_window_property)
(lisp_data_to_selection_data): Don't ever use pointers to Lisp
string data! Instead, just store the string object itself.
(syms_of_xselect): Initialize outstanding transfer list.
(syms_of_xselect_for_pdumper):
* src/xterm.c (x_delete_display): Remove outstanding selection
transfers.
* src/xterm.h: Update prototypes.
etc/NEWS
src/alloc.c
src/xftfont.c
src/xselect.c
src/xterm.c
src/xterm.h