]> git.eshelyaron.com Git - emacs.git/commit
Reduce complexity of scroll bar window protection code
authorPo Lu <luangruo@yahoo.com>
Sat, 24 Sep 2022 08:27:42 +0000 (16:27 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 24 Sep 2022 08:30:37 +0000 (16:30 +0800)
commit54876bf498f5e6b4f7a66a051b105c3ddd308945
tree48de4eac951b7cb9866d37011faeb55ee260ff0d
parent767a10cc63de8ce9f85ac688be33555278b4f3fb
Reduce complexity of scroll bar window protection code

It turns out my previous theories of why ClientMessages were
generated were wrong, and they are just generated so we can set
finish to X_EVENT_GOTO_OUT to have them delivered immediately.

This allows for the code to be simplified greatly, by not
unpacking pointers to the raw window into the client messages.

* src/xterm.c (x_unprotect_window_for_callback): Return the
window removed from the queue, or nil if none.
(x_scroll_bar_to_input_event)
(x_horizontal_scroll_bar_to_input_event): Use window provided by
x_unprotect_window_for_callback.
(handle_one_xevent): Pass dpyinfo to functions that need it.
(x_free_frame_resources): Remove "first scroll bar request"
code.

* src/xterm.h (struct x_display_info): Likewise.
src/xterm.c
src/xterm.h