From: Po Lu Date: Mon, 7 Feb 2022 01:42:08 +0000 (+0800) Subject: Correct implementation of extended frame synchronization X-Git-Tag: emacs-29.0.90~2470 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=011fa3a4cb6407603f3a77511977b9563f3438ba;p=emacs.git Correct implementation of extended frame synchronization * src/xterm.c (handle_one_xevent): Use value provided in the extended synchronization message as the current counter value. --- diff --git a/src/xterm.c b/src/xterm.c index 167e3a44d23..d3d8dc468cd 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9139,7 +9139,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, FRAME_X_OUTPUT (f)->sync_end_pending_p = true; } else if (event->xclient.data.l[4] == 1) - FRAME_X_OUTPUT (f)->ext_sync_end_pending_p = true; + { + XSyncIntsToValue (&FRAME_X_OUTPUT (f)->current_extended_counter_value, + event->xclient.data.l[2], event->xclient.data.l[3]); + FRAME_X_OUTPUT (f)->ext_sync_end_pending_p = true; + } *finish = X_EVENT_DROP; goto done;