]> git.eshelyaron.com Git - emacs.git/commit
Add support for basic syncing with the window manager on resize
authorPo Lu <luangruo@yahoo.com>
Sat, 5 Feb 2022 13:43:00 +0000 (21:43 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 5 Feb 2022 13:43:00 +0000 (21:43 +0800)
commit9e420cd893f5507b9d7d3888c3a6d709aa45e6ff
tree5a2d71ce0f282e7732f2774324970f4147ae3e24
parent63eab2948a23c6302308358472fb7f718759f67a
Add support for basic syncing with the window manager on resize

This is handled by GTK 3, so the code is disabled on that
specific build.  On other builds, this eliminates any unexposed
part of a frame from showing up after a resize when
`frame-resize-pixelwise' is t.

* configure.ac: Check for the X Synchronization Extension if
present.
* src/Makefile.in (EMACS_CFLAGS):
(LIBES): Add XSYNC_LIBS and XSYNC_CFLAGS.

* src/xfns.c (append_wm_protocols): Declare
`_NET_WM_SYNC_REQUEST' support if appropriate.
(x_window): Adjust location of call to `append_wm_protocols' on
Xt version to prevent it from being overwritten.
(Fx_create_frame): Create basic counter.
* src/xterm.c (XTframe_up_to_date): Set counter value to the one
asked for by the window manager.
(handle_one_xevent): Handle _NET_WM_SYNC_REQUEST.
(x_free_frame_resources): Free frame counter if present.
(x_term_init): Test for XSync and set fields accordingly.
* src/xterm.h (struct x_display_info): New fields for XSync
support and new atoms.
(struct x_output): New fields for counter status.
(FRAME_X_BASIC_COUNTER): New macro.
configure.ac
src/Makefile.in
src/xfns.c
src/xterm.c
src/xterm.h