]> git.eshelyaron.com Git - emacs.git/commit
Clean up X11 double buffering code
authorPo Lu <luangruo@yahoo.com>
Tue, 3 May 2022 01:22:06 +0000 (09:22 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 3 May 2022 01:22:06 +0000 (09:22 +0800)
commit952cc28e58eafbdd409bf36f9ca656dae533542b
treef51c18a73cff22d3b0b8294430b838cf59efbff6
parent64bcfcbd322d4fdb78c7d7dd0748dabc0e0b2cbc
Clean up X11 double buffering code

This fixes several latent bugs where code went down the path
with double buffering enabled when it wasn't, and vice versa.

* src/xfns.c (x_set_inhibit_double_buffering): Improve
commentary and only define when HAVE_XDBE.
(x_mark_frame_dirty): Only set buffer flip flag when HAVE_XDBE.
(initial_set_up_x_back_buffer): Clean up coding style and remove
unnecessary block_input pair.
(Fx_double_buffered_p): Always return nil if !HAVE_XDBE.
(x_frame_parm_handlers): Don't set double buffering handler if
!HAVE_XDBE.

* src/xftfont.c (xftfont_drop_xrender_surfaces, xftfont_driver):
Only define when XDBE is available.

* src/xterm.c (x_drop_xrender_surfaces): Likewise.
(x_clear_window): Don't test double buffering flags when
!HAVE_XDBE.
(show_back_buffer): Only define when HAVE_XDBE.
(x_flip_and_flush): Don't try to flip when !HAVE_XDBE.
(XTframe_up_to_date): Likewise.
(XTbuffer_flipping_unblocked_hook): Only define when Xdbe is
available.
(x_clear_area): Don't test double buffering flags when Xdbe is
not available.
(flush_dirty_back_buffer_on): Don't define if there's no DBE.
(handle_one_xevent, x_create_terminal): Likewise.

* src/xterm.h (FRAME_X_DRAWABLE): Fix coding style.
src/xfns.c
src/xftfont.c
src/xterm.c
src/xterm.h