]> code.delx.au - gnu-emacs/commit
Introduce x_uncatch_errors_after_check to reduce XSync calls.
authorKen Raeburn <raeburn@raeburn.org>
Wed, 7 Oct 2015 10:04:01 +0000 (06:04 -0400)
committerKen Raeburn <raeburn@raeburn.org>
Sun, 11 Oct 2015 05:15:08 +0000 (01:15 -0400)
commit5504ede9518053e619b2cc4bb01ce6eff254d3c8
tree86e3fb272f4f27d8847291256c71bd5e30e06bfc
parent54e3734a322aca9d396e4c7b0e73f08ac6c12501
Introduce x_uncatch_errors_after_check to reduce XSync calls.

Both x_had_errors_p and x_check_errors call XSync, so if they're
immediately followed by x_uncatch_errors, its XSync call will be
redundant, resulting in a wasted round trip to the X server.

* src/xterm.c (x_uncatch_errors_after_check): New routine; a copy of
x_uncatch_errors without the XSync call.
(XTmouse_position, x_wm_supports):
* src/xfns.c (x_set_mouse_color):
* src/xmenu.c (Fx_menu_bar_open_internal):
* src/xselect.c (x_own_selection, x_get_foreign_selection):
(Fx_get_atom_name): Call it instead of x_uncatch_errors.
* src/xterm.h (x_uncatch_errors_after_check): Declare.
src/xfns.c
src/xmenu.c
src/xselect.c
src/xterm.c
src/xterm.h