diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-17 17:08:07 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-30 20:31:13 -0700 |
commit | a100f5f5cd66c1baf91276834d0c1de9803856f3 (patch) | |
tree | 25b3462a2cdf0679d736285d9e8d2ab7cca1e232 /src/xlib_client.c | |
parent | 9e1e383021c82a78c9c3a0c23b3f76016a5569ed (diff) |
Expose sequence number setting "extension" to test programs
Allows setting specific sequeunce numbers for matching request patterns
to avoid having to match exact sequences of calls Xlib may make behind
the scenes to check for/use various extensions for you.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
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 |