]> git.eshelyaron.com Git - emacs.git/commit
Fix multiple sources of flicker under X
authorPo Lu <luangruo@yahoo.com>
Sun, 16 Oct 2022 06:02:31 +0000 (14:02 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 16 Oct 2022 06:02:31 +0000 (14:02 +0800)
commitda6778d1ce55843cd52da7db66bcb518c441e46e
tree47dda753ed3a9a4d115306d0a382c2e28e3aa20d
parent0ff389c0c17b0b2938e79640e86b594344f20e55
Fix multiple sources of flicker under X

Fix three kinds of flicker.  The first is if you do:

  (while t (sit-for 1) (redraw-display))

and press a key, the frame will turn blank until you C-g.  The
second is where handling async input happens in the middle of
drawing and causes a buffer flip to happen.  The third is where
unmapping the hourglass window causes exposures.

* src/dispnew.c (redraw_frame): Garbage the frame if it is a
window system frame.
* src/xterm.c (x_update_begin): Clear complete flag.
(x_flip_and_flush, XTframe_up_to_date): Set complete flag.
(x_show_hourglass): Fix hourglass window class.
(flush_dirty_back_buffer_on): Rename to
x_flush_dirty_back_buffer_on.
(x_flush_dirty_back_buffer_on): Check if the frame is complete
before trying to flip.
(handle_one_xevent): Flush frames in a more detailed fashion.
* src/xterm.h (struct x_output): New flag `complete'.
(FRAME_X_COMPLETE_P): New macro.
src/dispnew.c
src/xterm.c
src/xterm.h