diff --git a/dix/selection.c b/dix/selection.c index 1c9f3b4dd8..e408f2f546 100644 --- a/dix/selection.c +++ b/dix/selection.c @@ -161,6 +161,12 @@ ProcSetSelectionOwner(ClientPtr client) REQUEST(xSetSelectionOwnerReq); REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); + if (client->swapped) { + swapl(&stuff->window); + swapl(&stuff->selection); + swapl(&stuff->time); + } + UpdateCurrentTime(); time = ClientTimeToServerTime(stuff->time); diff --git a/dix/swapreq.c b/dix/swapreq.c index 262e231492..eb2b1a8051 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -214,17 +214,6 @@ SProcGetProperty(ClientPtr client) return ((*ProcVector[X_GetProperty]) (client)); } -int _X_COLD -SProcSetSelectionOwner(ClientPtr client) -{ - REQUEST(xSetSelectionOwnerReq); - REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); - swapl(&stuff->window); - swapl(&stuff->selection); - swapl(&stuff->time); - return ((*ProcVector[X_SetSelectionOwner]) (client)); -} - int _X_COLD SProcConvertSelection(ClientPtr client) { diff --git a/dix/tables.c b/dix/tables.c index 6f057c655d..b18c8eea67 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -353,7 +353,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { SProcDeleteProperty, SProcGetProperty, /* 20 */ ProcListProperties, - SProcSetSelectionOwner, + ProcSetSelectionOwner, ProcGetSelectionOwner, SProcConvertSelection, SProcSendEvent, /* 25 */ diff --git a/include/swapreq.h b/include/swapreq.h index c04a1b7ce3..9ffd794b15 100644 --- a/include/swapreq.h +++ b/include/swapreq.h @@ -75,7 +75,6 @@ int SProcSetClipRectangles(ClientPtr client); int SProcSetDashes(ClientPtr client); int SProcSetFontPath(ClientPtr client); int SProcSetScreenSaver(ClientPtr client); -int SProcSetSelectionOwner(ClientPtr client); int SProcStoreColors(ClientPtr client); int SProcStoreNamedColor(ClientPtr client); int SProcTranslateCoords(ClientPtr client);