diff options
author | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-11 11:55:48 +0200 |
commit | 6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch) | |
tree | 21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/randr/rrxinerama.c | |
parent | 75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff) | |
parent | d137057fd13e83ec15ab416c7fe774741da06047 (diff) | |
download | vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2 vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/Xext/shm.c
xorg-server/Xext/sync.c
xorg-server/Xext/xf86bigfont.c
xorg-server/Xi/opendev.c
xorg-server/dix/dispatch.c
xorg-server/include/globals.h
xorg-server/mi/miinitext.c
Diffstat (limited to 'xorg-server/randr/rrxinerama.c')
-rw-r--r-- | xorg-server/randr/rrxinerama.c | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c index aa8a61eee..63e2a318b 100644 --- a/xorg-server/randr/rrxinerama.c +++ b/xorg-server/randr/rrxinerama.c @@ -93,8 +93,8 @@ ProcRRXineramaQueryVersion(ClientPtr client) REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); rep.type = X_Reply; - rep.length = 0; rep.sequenceNumber = client->sequence; + rep.length = 0; rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION; rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION; if (client->swapped) { @@ -103,7 +103,7 @@ ProcRRXineramaQueryVersion(ClientPtr client) swaps(&rep.majorVersion); swaps(&rep.minorVersion); } - WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *) &rep); + WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), &rep); return Success; } @@ -130,17 +130,19 @@ ProcRRXineramaGetState(ClientPtr client) active = TRUE; } + rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; rep.state = active; + rep.sequenceNumber = client->sequence; + rep.length = 0; rep.window = stuff->window; + if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } - WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *) &rep); + WriteToClient(client, sizeof(xPanoramiXGetStateReply), &rep); return Success; } @@ -184,17 +186,19 @@ ProcRRXineramaGetScreenCount(ClientPtr client) if (rc != Success) return rc; + rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; 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); swapl(&rep.window); } - WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *) &rep); + WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), &rep); return Success; } @@ -215,13 +219,15 @@ ProcRRXineramaGetScreenSize(ClientPtr client) pScreen = pWin->drawable.pScreen; pRoot = pScreen->root; + rep.type = X_Reply; - rep.length = 0; 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); @@ -230,7 +236,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client) swapl(&rep.window); swapl(&rep.screen); } - WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *) &rep); + WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), &rep); return Success; } @@ -246,12 +252,13 @@ ProcRRXineramaIsActive(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; rep.state = RRXineramaScreenActive(screenInfo.screens[RR_XINERAMA_SCREEN]); + if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.state); } - WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep); + WriteToClient(client, sizeof(xXineramaIsActiveReply), &rep); return Success; } @@ -299,24 +306,29 @@ ProcRRXineramaQueryScreens(ClientPtr client) { xXineramaQueryScreensReply rep; ScreenPtr pScreen = screenInfo.screens[RR_XINERAMA_SCREEN]; + int n = 0; REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); - if (RRXineramaScreenActive(pScreen)) + if (RRXineramaScreenActive(pScreen)) { RRGetInfo(pScreen, FALSE); + n = RRXineramaScreenCount(pScreen); + } + rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.number = RRXineramaScreenCount(pScreen); - rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo); + rep.length = bytes_to_int32(n * sz_XineramaScreenInfo); + rep.number = n; + if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.number); } - WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *) &rep); + WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep); - if (rep.number) { + if (n) { rrScrPriv(pScreen); int i; int has_primary = 0; |