aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrproperty.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rrproperty.c')
-rw-r--r--xorg-server/randr/rrproperty.c81
1 files changed, 39 insertions, 42 deletions
diff --git a/xorg-server/randr/rrproperty.c b/xorg-server/randr/rrproperty.c
index 67b546728..dcc640e29 100644
--- a/xorg-server/randr/rrproperty.c
+++ b/xorg-server/randr/rrproperty.c
@@ -65,14 +65,13 @@ RRDestroyOutputProperty(RRPropertyPtr prop)
static void
RRDeleteProperty(RROutputRec * output, RRPropertyRec * prop)
{
- xRROutputPropertyNotifyEvent event = {
- .type = RREventBase + RRNotify,
- .subCode = RRNotify_OutputProperty,
- .output = output->id,
- .state = PropertyDelete,
- .atom = prop->propertyName,
- .timestamp = currentTime.milliseconds
- };
+ xRROutputPropertyNotifyEvent event;
+ event.type = RREventBase + RRNotify;
+ event.subCode = RRNotify_OutputProperty;
+ event.output = output->id;
+ event.state = PropertyDelete;
+ event.atom = prop->propertyName;
+ event.timestamp = currentTime.milliseconds;
RRDeliverPropertyEvent(output->pScreen, (xEvent *) &event);
@@ -238,14 +237,13 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
output->pendingProperties = TRUE;
if (sendevent) {
- xRROutputPropertyNotifyEvent event = {
- .type = RREventBase + RRNotify,
- .subCode = RRNotify_OutputProperty,
- .output = output->id,
- .state = PropertyNewValue,
- .atom = prop->propertyName,
- .timestamp = currentTime.milliseconds
- };
+ xRROutputPropertyNotifyEvent event;
+ event.type = RREventBase + RRNotify;
+ event.subCode = RRNotify_OutputProperty;
+ event.output = output->id;
+ event.state = PropertyNewValue;
+ event.atom = prop->propertyName;
+ event.timestamp = currentTime.milliseconds;
RRDeliverPropertyEvent(output->pScreen, (xEvent *) &event);
}
return Success;
@@ -403,12 +401,12 @@ ProcRRListOutputProperties(ClientPtr client)
if (!(pAtoms = (Atom *) malloc(numProps * sizeof(Atom))))
return BadAlloc;
- rep = (xRRListOutputPropertiesReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(numProps * sizeof(Atom)),
- .nAtoms = numProps
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(numProps * sizeof(Atom));
+ rep.nAtoms = numProps;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -452,14 +450,13 @@ ProcRRQueryOutputProperty(ClientPtr client)
return BadAlloc;
}
- rep = (xRRQueryOutputPropertyReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = prop->num_valid,
- .pending = prop->is_pending,
- .range = prop->range,
- .immutable = prop->immutable
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = prop->num_valid;
+ rep.pending = prop->is_pending;
+ rep.range = prop->range;
+ rep.immutable = prop->immutable;
if (client->swapped) {
swaps(&rep.sequenceNumber);
@@ -611,10 +608,10 @@ ProcRRGetOutputProperty(ClientPtr client)
if (prop->propertyName == stuff->property)
break;
- reply = (xRRGetOutputPropertyReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence
- };
+
+ reply.type = X_Reply;
+ reply.sequenceNumber = client->sequence;
+
if (!prop) {
reply.nItems = 0;
reply.length = 0;
@@ -691,14 +688,14 @@ ProcRRGetOutputProperty(ClientPtr client)
reply.propertyType = prop_value->type;
if (stuff->delete && (reply.bytesAfter == 0)) {
- xRROutputPropertyNotifyEvent event = {
- .type = RREventBase + RRNotify,
- .subCode = RRNotify_OutputProperty,
- .output = output->id,
- .state = PropertyDelete,
- .atom = prop->propertyName,
- .timestamp = currentTime.milliseconds
- };
+ xRROutputPropertyNotifyEvent event;
+ event.type = RREventBase + RRNotify;
+ event.subCode = RRNotify_OutputProperty;
+ event.output = output->id;
+ event.state = PropertyDelete;
+ event.atom = prop->propertyName;
+ event.timestamp = currentTime.milliseconds;
+
RRDeliverPropertyEvent(output->pScreen, (xEvent *) &event);
}