mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 20:18:03 +02:00
Use the new XCBSendRequest flag, XCB_REQUEST_RAW, to hand a bag-o-bytes down uninterpreted.
This commit is contained in:
parent
07bdf1fbbf
commit
8356ba37d3
1 changed files with 1 additions and 14 deletions
|
|
@ -153,8 +153,7 @@ static inline int issue_complete_request(Display *dpy, int veclen, struct iovec
|
|||
{
|
||||
XCBProtocolRequest xcb_req = { 0 };
|
||||
unsigned int sequence;
|
||||
int flags = 0;
|
||||
int bigreq = 0;
|
||||
int flags = XCB_REQUEST_RAW;
|
||||
int i;
|
||||
CARD32 len;
|
||||
size_t rem;
|
||||
|
|
@ -170,11 +169,8 @@ static inline int issue_complete_request(Display *dpy, int veclen, struct iovec
|
|||
* fixed-length request parts. */
|
||||
len = ((CARD16 *) vec[0].iov_base)[1];
|
||||
if(len == 0)
|
||||
{
|
||||
/* it's a bigrequest. dig out the *real* length field. */
|
||||
len = ((CARD32 *) vec[0].iov_base)[1];
|
||||
bigreq = 1;
|
||||
}
|
||||
|
||||
/* do we have enough data for a complete request? how many iovec
|
||||
* elements does it span? */
|
||||
|
|
@ -205,15 +201,6 @@ static inline int issue_complete_request(Display *dpy, int veclen, struct iovec
|
|||
xcb_req.count = i + 1;
|
||||
xcb_req.opcode = ((CARD8 *) vec[0].iov_base)[0];
|
||||
|
||||
/* undo bigrequest formatting. XCBSendRequest will redo it. */
|
||||
if(bigreq)
|
||||
{
|
||||
CARD32 *p = vec[0].iov_base;
|
||||
p[1] = p[0];
|
||||
vec[0].iov_base = (char *) vec[0].iov_base + 4;
|
||||
vec[0].iov_len -= 4;
|
||||
}
|
||||
|
||||
/* if we don't own the event queue, we have to ask XCB to set our
|
||||
* errors aside for us. */
|
||||
if(dpy->xcl->event_owner != XlibOwnsEventQueue)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue