]> git.eshelyaron.com Git - emacs.git/commitdiff
Correct implementation of extended frame synchronization
authorPo Lu <luangruo@yahoo.com>
Mon, 7 Feb 2022 01:42:08 +0000 (09:42 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 7 Feb 2022 01:42:08 +0000 (09:42 +0800)
* src/xterm.c (handle_one_xevent): Use value provided in the
extended synchronization message as the current counter value.

src/xterm.c

index 167e3a44d234ce8014abaf2d5ee99d2cf60c990d..d3d8dc468cd26039edd2f06bc510dd1883947489 100644 (file)
@@ -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;