Really fix extended frame synchronization
* src/xterm.c (XTframe_up_to_date): Make sure the extended counter ends up even.
This commit is contained in:
parent
f91a911ef3
commit
61a5bbc683
1 changed files with 13 additions and 4 deletions
17
src/xterm.c
17
src/xterm.c
|
@ -1848,6 +1848,12 @@ x_update_end (struct frame *f)
|
|||
static void
|
||||
XTframe_up_to_date (struct frame *f)
|
||||
{
|
||||
#ifdef HAVE_XSYNC
|
||||
XSyncValue add;
|
||||
XSyncValue current;
|
||||
Bool overflow_p;
|
||||
#endif
|
||||
|
||||
eassert (FRAME_X_P (f));
|
||||
block_input ();
|
||||
FRAME_MOUSE_UPDATE (f);
|
||||
|
@ -1867,12 +1873,15 @@ XTframe_up_to_date (struct frame *f)
|
|||
if (FRAME_X_OUTPUT (f)->ext_sync_end_pending_p
|
||||
&& FRAME_X_EXTENDED_COUNTER (f) != None)
|
||||
{
|
||||
XSyncValue add;
|
||||
Bool overflow_p;
|
||||
current = FRAME_X_OUTPUT (f)->current_extended_counter_value;
|
||||
|
||||
if (XSyncValueLow32 (current) % 2)
|
||||
XSyncIntToValue (&add, 1);
|
||||
else
|
||||
XSyncIntToValue (&add, 2);
|
||||
|
||||
XSyncIntToValue (&add, 1);
|
||||
XSyncValueAdd (&FRAME_X_OUTPUT (f)->current_extended_counter_value,
|
||||
add, add, &overflow_p);
|
||||
current, add, &overflow_p);
|
||||
|
||||
if (overflow_p)
|
||||
emacs_abort ();
|
||||
|
|
Loading…
Add table
Reference in a new issue