diff options
Diffstat (limited to 'xorg-server/randr/rroutput.c')
| -rw-r--r-- | xorg-server/randr/rroutput.c | 70 | 
1 files changed, 35 insertions, 35 deletions
| diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c index 88781ba0f..1eb071b4e 100644 --- a/xorg-server/randr/rroutput.c +++ b/xorg-server/randr/rroutput.c @@ -305,22 +305,23 @@ RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output)      ScreenPtr pScreen = pWin->drawable.pScreen;      rrScrPriv(pScreen); +    xRROutputChangeNotifyEvent oe;      RRCrtcPtr crtc = output->crtc;      RRModePtr mode = crtc ? crtc->mode : NULL; -    xRROutputChangeNotifyEvent oe = { -        .type = RRNotify + RREventBase, -        .subCode = RRNotify_OutputChange, -        .timestamp = pScrPriv->lastSetTime.milliseconds, -        .configTimestamp = pScrPriv->lastConfigTime.milliseconds, -        .window = pWin->drawable.id, -        .output = output->id, -        .crtc = crtc ? crtc->id : None, -        .mode = mode ? mode->mode.id : None, -        .rotation = crtc ? crtc->rotation : RR_Rotate_0, -        .connection = output->connection, -        .subpixelOrder = output->subpixelOrder -    }; + +    oe.type = RRNotify + RREventBase; +    oe.subCode = RRNotify_OutputChange; +    oe.timestamp = pScrPriv->lastSetTime.milliseconds; +    oe.configTimestamp = pScrPriv->lastConfigTime.milliseconds; +    oe.window = pWin->drawable.id; +    oe.output = output->id; +    oe.crtc = crtc ? crtc->id : None; +    oe.mode = mode ? mode->mode.id : None; +    oe.rotation = crtc ? crtc->rotation : RR_Rotate_0; +    oe.connection = output->connection; +    oe.subpixelOrder = output->subpixelOrder; +      WriteEventsToClient(client, 1, (xEvent *) &oe);  } @@ -419,23 +420,23 @@ ProcRRGetOutputInfo(ClientPtr client)      pScreen = output->pScreen;      pScrPriv = rrGetScrPriv(pScreen); -    rep = (xRRGetOutputInfoReply) { -        .type = X_Reply, -        .status = RRSetConfigSuccess, -        .sequenceNumber = client->sequence, -        .length = bytes_to_int32(OutputInfoExtra), -        .timestamp = pScrPriv->lastSetTime.milliseconds, -        .crtc = output->crtc ? output->crtc->id : None, -        .mmWidth = output->mmWidth, -        .mmHeight = output->mmHeight, -        .connection = output->connection, -        .subpixelOrder = output->subpixelOrder, -        .nCrtcs = output->numCrtcs, -        .nModes = output->numModes + output->numUserModes, -        .nPreferred = output->numPreferred, -        .nClones = output->numClones, -        .nameLength = output->nameLength -    }; + +    rep.type = X_Reply; +    rep.status = RRSetConfigSuccess; +    rep.sequenceNumber = client->sequence; +    rep.length = bytes_to_int32(OutputInfoExtra); +    rep.timestamp = pScrPriv->lastSetTime.milliseconds; +    rep.crtc = output->crtc ? output->crtc->id : None; +    rep.mmWidth = output->mmWidth; +    rep.mmHeight = output->mmHeight; +    rep.connection = output->connection; +    rep.subpixelOrder = output->subpixelOrder; +    rep.nCrtcs = output->numCrtcs; +    rep.nModes = output->numModes + output->numUserModes; +    rep.nPreferred = output->numPreferred; +    rep.nClones = output->numClones; +    rep.nameLength = output->nameLength; +      extraLen = ((output->numCrtcs +                   output->numModes + output->numUserModes +                   output->numClones + bytes_to_int32(rep.nameLength)) << 2); @@ -568,11 +569,10 @@ ProcRRGetOutputPrimary(ClientPtr client)      if (pScrPriv)          primary = pScrPriv->primaryOutput; -    rep = (xRRGetOutputPrimaryReply) { -        .type = X_Reply, -        .sequenceNumber = client->sequence, -        .output = primary ? primary->id : None -    }; +    memset(&rep, 0, sizeof(rep)); +    rep.type = X_Reply; +    rep.sequenceNumber = client->sequence; +    rep.output = primary ? primary->id : None;      if (client->swapped) {          swaps(&rep.sequenceNumber); | 
