summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-02-05 21:43:00 +0800
committerPo Lu <luangruo@yahoo.com>2022-02-05 21:43:00 +0800
commit9e420cd893f5507b9d7d3888c3a6d709aa45e6ff (patch)
tree5a2d71ce0f282e7732f2774324970f4147ae3e24 /configure.ac
parent63eab2948a23c6302308358472fb7f718759f67a (diff)
downloademacs-9e420cd893f5507b9d7d3888c3a6d709aa45e6ff.tar.gz
emacs-9e420cd893f5507b9d7d3888c3a6d709aa45e6ff.tar.bz2
emacs-9e420cd893f5507b9d7d3888c3a6d709aa45e6ff.zip
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2ad5f2312c1..6f469cf0f04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4490,6 +4490,22 @@ fi
AC_SUBST(XINPUT_CFLAGS)
AC_SUBST(XINPUT_LIBS)
+XSYNC_LIBS=
+XSYNC_CFLAGS=
+HAVE_XSYNC=no
+if test "${HAVE_X11}" = "yes"; then
+ AC_CHECK_HEADER(X11/extensions/sync.h,
+ AC_CHECK_LIB(Xext, XSyncQueryExtension, HAVE_XSYNC=yes),
+ [], [#include <X11/Xlib.h>])
+
+ if test "${HAVE_XSYNC}" = "yes"; then
+ AC_DEFINE(HAVE_XSYNC, 1, [Define to 1 if the X Synchronization Extension is available.])
+ XSYNC_LIBS="-lXext"
+ fi
+fi
+AC_SUBST(XSYNC_LIBS)
+AC_SUBST(XSYNC_CFLAGS)
+
### Use Xdbe (-lXdbe) if available
HAVE_XDBE=no
if test "${HAVE_X11}" = "yes"; then