mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dix: write out xGetSelectionOwnerReply directly
This commit is contained in:
@@ -219,7 +219,6 @@ ProcGetSelectionOwner(ClientPtr client)
|
||||
{
|
||||
int rc;
|
||||
Selection *pSel;
|
||||
xGetSelectionOwnerReply reply;
|
||||
|
||||
REQUEST(xResourceReq);
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
@@ -229,7 +228,7 @@ ProcGetSelectionOwner(ClientPtr client)
|
||||
return BadAtom;
|
||||
}
|
||||
|
||||
reply = (xGetSelectionOwnerReply) {
|
||||
xGetSelectionOwnerReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
@@ -237,13 +236,18 @@ ProcGetSelectionOwner(ClientPtr client)
|
||||
|
||||
rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess);
|
||||
if (rc == Success)
|
||||
reply.owner = pSel->window;
|
||||
rep.owner = pSel->window;
|
||||
else if (rc == BadMatch)
|
||||
reply.owner = None;
|
||||
rep.owner = None;
|
||||
else
|
||||
return rc;
|
||||
|
||||
WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.owner);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
@@ -249,15 +249,6 @@ SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply * pRep)
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||
xGetSelectionOwnerReply * pRep)
|
||||
{
|
||||
swaps(&pRep->sequenceNumber);
|
||||
swapl(&pRep->owner);
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply * pRep)
|
||||
{
|
||||
|
||||
@@ -739,7 +739,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
||||
(ReplySwapPtr) SGetPropertyReply, /* 20 */
|
||||
(ReplySwapPtr) SListPropertiesReply,
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SGetSelectionOwnerReply,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd, /* 25 */
|
||||
(ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */
|
||||
|
||||
@@ -67,11 +67,6 @@ extern void SListPropertiesReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xListPropertiesReply * /* pRep */ );
|
||||
|
||||
extern void SGetSelectionOwnerReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetSelectionOwnerReply *
|
||||
/* pRep */ );
|
||||
|
||||
extern void SQueryPointerReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xQueryPointerReply * /* pRep */ );
|
||||
|
||||
Reference in New Issue
Block a user