diff options
Diffstat (limited to 'src/xlib_client.c')
-rw-r--r-- | src/xlib_client.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/xlib_client.c b/src/xlib_client.c index 03b56c8..a612910 100644 --- a/src/xlib_client.c +++ b/src/xlib_client.c @@ -36,7 +36,6 @@ Display * XhivOpenDisplay(xhiv_response *responses) { char *dpyname; Display *dpy; - xReq *xssreq; dpyname = XhivOpenServer(responses, &server_pid); assert(dpyname != NULL); @@ -44,13 +43,20 @@ XhivOpenDisplay(xhiv_response *responses) { dpy = XOpenDisplay(dpyname); assert(dpy != NULL); + XhivSequenceSync(dpy, 0); + + return dpy; +} + +void +XhivSequenceSync(Display *dpy, uint32_t sequence) { + xResourceReq *xssreq; + LockDisplay(dpy); - GetEmptyReq(XHIV_PROTO_REQTYPE, xssreq); - xssreq->data = XhivSeqStart; + GetResReq(XHIV_PROTO_REQTYPE, sequence, xssreq); + ((xXhivSeqStartReq *)xssreq)->reqMinor = XhivSeqStart; UnlockDisplay(dpy); SyncHandle(); - - return dpy; } int |