Refactor _XFlush and _XSend code that sets dpy->synchandler to _XSeqSyncFunction into a new function, _XSetSeqSyncFunction. It makes the patch for XCB cleaner, but is arguably a good idea anyway.

This commit is contained in:
Jamey Sharp 2006-02-14 19:37:36 +00:00
parent 010c3acbb3
commit 6b0158dfad
2 changed files with 21 additions and 12 deletions

View file

@ -1,3 +1,10 @@
2006-02-13 Jamey Sharp <jamey@minilop.net>
* src/XlibInt.c:
Refactor _XFlush and _XSend code that sets dpy->synchandler to
_XSeqSyncFunction into a new function, _XSetSeqSyncFunction. It makes
the patch for XCB cleaner, but is arguably a good idea anyway.
2006-02-12 Alan Coopersmith <alan.coopersmith@sun.com>
* man/Makefile.am:

View file

@ -577,6 +577,18 @@ int _XSeqSyncFunction(
return 0;
}
static
void _XSetSeqSyncFunction(
register Display *dpy)
{
if ((dpy->request - dpy->last_request_read) >= SEQLIMIT &&
!(dpy->flags & XlibDisplayPrivSync)) {
dpy->savedsynchandler = dpy->synchandler;
dpy->synchandler = _XSeqSyncFunction;
dpy->flags |= XlibDisplayPrivSync;
}
}
#ifdef XTHREADS
static void _XFlushInt(
register Display *dpy,
@ -689,12 +701,7 @@ static void _XFlushInt(
}
}
dpy->last_req = (char *)&_dummy_request;
if ((dpy->request - dpy->last_request_read) >= SEQLIMIT &&
!(dpy->flags & XlibDisplayPrivSync)) {
dpy->savedsynchandler = dpy->synchandler;
dpy->synchandler = _XSeqSyncFunction;
dpy->flags |= XlibDisplayPrivSync;
}
_XSetSeqSyncFunction(dpy);
dpy->bufptr = dpy->buffer;
#ifdef XTHREADS
dpy->flags &= ~XlibDisplayWriting;
@ -1452,12 +1459,7 @@ _XSend (
}
}
dpy->last_req = (char *) & _dummy_request;
if ((dpy->request - dpy->last_request_read) >= SEQLIMIT &&
!(dpy->flags & XlibDisplayPrivSync)) {
dpy->savedsynchandler = dpy->synchandler;
dpy->synchandler = _XSeqSyncFunction;
dpy->flags |= XlibDisplayPrivSync;
}
_XSetSeqSyncFunction(dpy);
dpy->bufptr = dpy->buffer;
#ifdef XTHREADS
dpy->flags &= ~XlibDisplayWriting;