aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-08-23 20:52:41 +0800
committerPo Lu2022-08-23 20:53:24 +0800
commita328bf65ef31d0134fc3d522f28b2da000a5e742 (patch)
tree3992ad52247bf1dd0eef4be0e1103a00b7723053
parent3b7fb723e6a02e760e18942f577f21a88ad852a8 (diff)
downloademacs-a328bf65ef31d0134fc3d522f28b2da000a5e742.tar.gz
emacs-a328bf65ef31d0134fc3d522f28b2da000a5e742.zip
Make frame synchronization conditional on clock_gettime
* src/xfns.c (x_set_parent_frame) (x_set_use_frame_synchronization): * src/xterm.c (x_update_begin, show_back_buffer, x_update_end) (x_display_set_last_user_time, handle_one_xevent): * src/xterm.h (struct x_output): Define out vsync code when !HAVE_CLOCK_GETTIME. (bug#57346)
-rw-r--r--src/xfns.c3
-rw-r--r--src/xterm.c4
-rw-r--r--src/xterm.h3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 7eecda6dbd1..0b1f707e9fc 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5156,7 +5156,8 @@ This function is an internal primitive--use `make-frame' instead. */)
5156 ((STRINGP (value) 5156 ((STRINGP (value)
5157 && !strcmp (SSDATA (value), "extended")) ? 2 : 1)); 5157 && !strcmp (SSDATA (value), "extended")) ? 2 : 1));
5158 5158
5159#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK 5159#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
5160 && defined HAVE_CLOCK_GETTIME
5160 x_sync_init_fences (f); 5161 x_sync_init_fences (f);
5161#endif 5162#endif
5162#endif 5163#endif
diff --git a/src/xterm.c b/src/xterm.c
index 8de273cb8f5..26c512d80a8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7600,7 +7600,7 @@ x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time,
7600#ifndef USE_GTK 7600#ifndef USE_GTK
7601 struct frame *focus_frame; 7601 struct frame *focus_frame;
7602 Time old_time; 7602 Time old_time;
7603#if defined HAVE_XSYNC 7603#if defined HAVE_XSYNC && defined HAVE_CLOCK_GETTIME
7604 uint64_t monotonic_time; 7604 uint64_t monotonic_time;
7605#endif 7605#endif
7606 7606
@@ -27024,7 +27024,7 @@ x_free_frame_resources (struct frame *f)
27024 XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->bottom_left_corner_cursor); 27024 XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->bottom_left_corner_cursor);
27025 27025
27026 /* Free sync fences. */ 27026 /* Free sync fences. */
27027#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK 27027#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK && defined CLOCK_GETTIME
27028 x_sync_free_fences (f); 27028 x_sync_free_fences (f);
27029#endif 27029#endif
27030 } 27030 }
diff --git a/src/xterm.h b/src/xterm.h
index 75277c166e0..8500ec27710 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1577,7 +1577,8 @@ extern void x_make_frame_invisible (struct frame *);
1577extern void x_iconify_frame (struct frame *); 1577extern void x_iconify_frame (struct frame *);
1578extern void x_free_frame_resources (struct frame *); 1578extern void x_free_frame_resources (struct frame *);
1579extern void x_wm_set_size_hint (struct frame *, long, bool); 1579extern void x_wm_set_size_hint (struct frame *, long, bool);
1580#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK 1580#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
1581 && defined HAVE_CLOCK_GETTIME
1581extern void x_sync_init_fences (struct frame *); 1582extern void x_sync_init_fences (struct frame *);
1582#endif 1583#endif
1583 1584