diff --git a/Xext/meson.build b/Xext/meson.build index 1695b71a18..387219799b 100644 --- a/Xext/meson.build +++ b/Xext/meson.build @@ -39,7 +39,7 @@ if build_xf86bigfont endif if build_xinerama - srcs_xext += ['panoramiX.c', 'panoramiXprocs.c', 'panoramiXSwap.c'] + srcs_xext += ['panoramiX.c', 'panoramiXprocs.c'] endif if build_xsecurity diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index fadc3c58ea..012d6efbb9 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -450,7 +450,8 @@ PanoramiXExtensionInit(void) while (panoramiXGeneration != serverGeneration) { extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, ProcPanoramiXDispatch, - SProcPanoramiXDispatch, PanoramiXResetProc, + ProcPanoramiXDispatch, + PanoramiXResetProc, StandardMinorOpcode); if (!extEntry) break; @@ -898,10 +899,14 @@ int ProcPanoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + + if (client->swapped) + swapl(&stuff->window); + WindowPtr pWin; int rc; - REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -923,10 +928,14 @@ int ProcPanoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + + if (client->swapped) + swapl(&stuff->window); + WindowPtr pWin; int rc; - REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -947,11 +956,16 @@ int ProcPanoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + + if (client->swapped) { + swapl(&stuff->window); + swapl(&stuff->screen); + } + WindowPtr pWin; int rc; - REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); - if (stuff->screen >= PanoramiXNumScreens) return BadMatch; diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c deleted file mode 100644 index 4845d7460e..0000000000 --- a/Xext/panoramiXSwap.c +++ /dev/null @@ -1,97 +0,0 @@ -/***************************************************************** -Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, -BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Digital Equipment Corporation -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Digital -Equipment Corporation. -******************************************************************/ - -#include - -#include -#include -#include -#include - -#include "Xext/panoramiX.h" -#include "Xext/panoramiXsrv.h" - -#include "misc.h" -#include "cursor.h" -#include "cursorstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "gc.h" -#include "gcstruct.h" -#include "scrnintstr.h" -#include "window.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "globals.h" -#include "panoramiXh.h" - -static int _X_COLD -SProcPanoramiXGetState(ClientPtr client) -{ - REQUEST(xPanoramiXGetStateReq); - REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); - swapl(&stuff->window); - return ProcPanoramiXGetState(client); -} - -static int _X_COLD -SProcPanoramiXGetScreenCount(ClientPtr client) -{ - REQUEST(xPanoramiXGetScreenCountReq); - REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); - swapl(&stuff->window); - return ProcPanoramiXGetScreenCount(client); -} - -static int _X_COLD -SProcPanoramiXGetScreenSize(ClientPtr client) -{ - REQUEST(xPanoramiXGetScreenSizeReq); - REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); - swapl(&stuff->window); - swapl(&stuff->screen); - return ProcPanoramiXGetScreenSize(client); -} - -int _X_COLD -SProcPanoramiXDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) { - case X_PanoramiXQueryVersion: - return ProcPanoramiXQueryVersion(client); - case X_PanoramiXGetState: - return SProcPanoramiXGetState(client); - case X_PanoramiXGetScreenCount: - return SProcPanoramiXGetScreenCount(client); - case X_PanoramiXGetScreenSize: - return SProcPanoramiXGetScreenSize(client); - case X_XineramaIsActive: - return ProcXineramaIsActive(client); - case X_XineramaQueryScreens: - return ProcXineramaQueryScreens(client); - } - return BadRequest; -} diff --git a/Xext/panoramiXh.h b/Xext/panoramiXh.h index 9f970dac80..6e3d96ca0b 100644 --- a/Xext/panoramiXh.h +++ b/Xext/panoramiXh.h @@ -65,8 +65,6 @@ int ProcPanoramiXGetScreenSize(ClientPtr client); int ProcXineramaQueryScreens(ClientPtr client); int ProcXineramaIsActive(ClientPtr client); -int SProcPanoramiXDispatch(ClientPtr client); - extern int connBlockScreenStart; extern xConnSetupPrefix connSetupPrefix;