diff options
| author | Po Lu | 2022-08-23 20:52:41 +0800 |
|---|---|---|
| committer | Po Lu | 2022-08-23 20:53:24 +0800 |
| commit | a328bf65ef31d0134fc3d522f28b2da000a5e742 (patch) | |
| tree | 3992ad52247bf1dd0eef4be0e1103a00b7723053 /src | |
| parent | 3b7fb723e6a02e760e18942f577f21a88ad852a8 (diff) | |
| download | emacs-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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 3 | ||||
| -rw-r--r-- | src/xterm.c | 4 | ||||
| -rw-r--r-- | src/xterm.h | 3 |
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 *); | |||
| 1577 | extern void x_iconify_frame (struct frame *); | 1577 | extern void x_iconify_frame (struct frame *); |
| 1578 | extern void x_free_frame_resources (struct frame *); | 1578 | extern void x_free_frame_resources (struct frame *); |
| 1579 | extern void x_wm_set_size_hint (struct frame *, long, bool); | 1579 | extern 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 | ||
| 1581 | extern void x_sync_init_fences (struct frame *); | 1582 | extern void x_sync_init_fences (struct frame *); |
| 1582 | #endif | 1583 | #endif |
| 1583 | 1584 | ||