]> code.delx.au - gnu-emacs/commit
Rewrite x_set_mouse_color to sync less.
authorKen Raeburn <raeburn@raeburn.org>
Sat, 3 Oct 2015 03:36:31 +0000 (23:36 -0400)
committerKen Raeburn <raeburn@raeburn.org>
Sun, 11 Oct 2015 05:15:19 +0000 (01:15 -0400)
commit08e27d294468aa72cb06a50821dbade8ea03b2ce
treeb71fc8936932d3c818847e16386a9d2736cf98a5
parentfcb5d3e8b158f7ea8492aa14f79804fae18e76f9
Rewrite x_set_mouse_color to sync less.

We can track serial numbers of X requests and correlate error events
with the associated requests.  This way we can identify errors for
specific calls without having to use XSync after every one.

* src/xfns.c (enum mouse_cursor): New type.
(struct mouse_cursor_types, struct mouse_cursor_data): New types.
(mouse_cursor_types): New array listing the Lisp variables and default
cursor appearances for each cursor type.
(x_set_mouse_color_handler): New function; checks error event serial
number against submitted requests.
(x_set_mouse_color): Updated to use the new error handler callback,
and to be more table-driven, to simplify repetitious code.
src/xfns.c