aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrxinerama.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rrxinerama.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/randr/rrxinerama.c83
1 files changed, 41 insertions, 42 deletions
diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c
index b6e9586d7..d82d28ab4 100644..100755
--- a/xorg-server/randr/rrxinerama.c
+++ b/xorg-server/randr/rrxinerama.c
@@ -91,15 +91,14 @@ Bool noRRXineramaExtension = FALSE;
int
ProcRRXineramaQueryVersion(ClientPtr client)
{
- xPanoramiXQueryVersionReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION,
- .minorVersion = SERVER_RRXINERAMA_MINOR_VERSION
- };
+ xPanoramiXQueryVersionReply rep;
REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION;
+ rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -133,13 +132,13 @@ ProcRRXineramaGetState(ClientPtr client)
active = TRUE;
}
- rep = (xPanoramiXGetStateReply) {
- .type = X_Reply,
- .state = active,
- .sequenceNumber = client->sequence,
- .length = 0,
- .window = stuff->window
- };
+
+ rep.type = X_Reply;
+ rep.state = active;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.window = stuff->window;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -174,13 +173,13 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
if (rc != Success)
return rc;
- rep = (xPanoramiXGetScreenCountReply) {
- .type = X_Reply,
- .ScreenCount = RRXineramaScreenCount(pWin->drawable.pScreen),
- .sequenceNumber = client->sequence,
- .length = 0,
- .window = stuff->window
- };
+
+ rep.type = X_Reply;
+ rep.ScreenCount = RRXineramaScreenCount(pWin->drawable.pScreen);
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.window = stuff->window;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -207,15 +206,15 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
pScreen = pWin->drawable.pScreen;
pRoot = pScreen->root;
- rep = (xPanoramiXGetScreenSizeReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .width = pRoot->drawable.width,
- .height = pRoot->drawable.height,
- .window = stuff->window,
- .screen = stuff->screen
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.width = pRoot->drawable.width;
+ rep.height = pRoot->drawable.height;
+ rep.window = stuff->window;
+ rep.screen = stuff->screen;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -235,12 +234,12 @@ ProcRRXineramaIsActive(ClientPtr client)
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
- rep = (xXineramaIsActiveReply) {
- .type = X_Reply,
- .length = 0,
- .sequenceNumber = client->sequence,
- .state = RRXineramaScreenActive(screenInfo.screens[RR_XINERAMA_SCREEN])
- };
+ memset(&rep, 0, sizeof(xXineramaIsActiveReply));
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.state = RRXineramaScreenActive(screenInfo.screens[RR_XINERAMA_SCREEN]);
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@@ -280,12 +279,12 @@ ProcRRXineramaQueryScreens(ClientPtr client)
return BadAlloc;
}
- rep = (xXineramaQueryScreensReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(nmonitors * sz_XineramaScreenInfo),
- .number = nmonitors
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(nmonitors * sz_XineramaScreenInfo);
+ rep.number = nmonitors;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);