aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/selection.c')
-rw-r--r--xorg-server/dix/selection.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/xorg-server/dix/selection.c b/xorg-server/dix/selection.c
index e905b1ec2..060afb808 100644
--- a/xorg-server/dix/selection.c
+++ b/xorg-server/dix/selection.c
@@ -181,11 +181,11 @@ ProcSetSelectionOwner(ClientPtr client)
if (CompareTimeStamps(time, pSel->lastTimeChanged) == EARLIER)
return Success;
if (pSel->client && (!pWin || (pSel->client != client))) {
- xEvent event = {
- .u.selectionClear.time = time.milliseconds,
- .u.selectionClear.window = pSel->window,
- .u.selectionClear.atom = pSel->selection
- };
+ xEvent event;
+ event.u.selectionClear.time = time.milliseconds;
+ event.u.selectionClear.window = pSel->window;
+ event.u.selectionClear.atom = pSel->selection;
+
event.u.u.type = SelectionClear;
WriteEventsToClient(pSel->client, 1, &event);
}
@@ -238,11 +238,10 @@ ProcGetSelectionOwner(ClientPtr client)
return BadAtom;
}
- reply = (xGetSelectionOwnerReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- };
+ memset(&reply, 0, sizeof(xGetSelectionOwnerReply));
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+ reply.length = 0;
rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess);
if (rc == Success)