]> git.eshelyaron.com Git - emacs.git/commit
Implement monitor refresh rate synchronization on X
authorPo Lu <luangruo@yahoo.com>
Fri, 29 Jul 2022 08:20:32 +0000 (16:20 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 29 Jul 2022 09:27:36 +0000 (17:27 +0800)
commitee93a06b8b1922b31e12cfe60566779f185ddeba
tree31d1e4e2ec3c64ea78c077b91a5546e6322ef274
parentdb03eda6369a9d4af3c72a8ab6ec29e3cc58acc4
Implement monitor refresh rate synchronization on X

* src/xfns.c (x_set_parent_frame, Fx_create_frame): Disable
vsync on child and embedded frames.
* src/xmenu.c (x_menu_show): Fix XMenu position calculation in
child frames.

* src/xterm.c (x_sync_is_frame_drawn_event)
(x_sync_wait_for_frame_drawn_event): New functions.
(x_sync_update_begin): Wait for frame to be drawn if not double
buffered.
(x_sync_update_finish): Set FRAME_X_WAITING_FOR_DRAW (f).
(show_back_buffer): Wait for frame to be drawn before flipping
buffers.
(XTframe_up_to_date): Set FRAME_X_WAITING_FOR_DRAW if bumped.
(handle_one_xevent): Handle frame drawn events.

* src/xterm.h (struct x_output): New fields for frame dirtyness
and vsync.
src/xfns.c
src/xmenu.c
src/xterm.c
src/xterm.h