composite: untwist Xinerama handling
The current way of switching between Xinerama and single-screen handlers is quite complicated and needs call vector tables that are changed on the fly, which in turn makes dispatching more complicated. Reworking this into a simple and straight code flow, where individual request procs just look at a flag to decide whether to call the Xinerama or single screen version. This isn't just much easier to understand (and debug), but also removes the need or the call vectors, thus allowing further simplification of the dispatcher. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
ec4443f070
commit
0bf08776c8
|
@ -54,6 +54,8 @@
|
||||||
static CARD8 CompositeReqCode;
|
static CARD8 CompositeReqCode;
|
||||||
static DevPrivateKeyRec CompositeClientPrivateKeyRec;
|
static DevPrivateKeyRec CompositeClientPrivateKeyRec;
|
||||||
|
|
||||||
|
static int compositeUseXinerama = 0;
|
||||||
|
|
||||||
#define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec)
|
#define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec)
|
||||||
RESTYPE CompositeClientWindowType;
|
RESTYPE CompositeClientWindowType;
|
||||||
RESTYPE CompositeClientSubwindowsType;
|
RESTYPE CompositeClientSubwindowsType;
|
||||||
|
@ -139,13 +141,10 @@ ProcCompositeQueryVersion(ClientPtr client)
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeRedirectWindow(ClientPtr client)
|
SingleCompositeRedirectWindow(ClientPtr client, xCompositeRedirectWindowReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xCompositeRedirectWindowReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client,
|
VERIFY_WINDOW(pWin, stuff->window, client,
|
||||||
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
||||||
|
|
||||||
|
@ -153,13 +152,10 @@ ProcCompositeRedirectWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeRedirectSubwindows(ClientPtr client)
|
SingleRedirectSubwindows(ClientPtr client, xCompositeRedirectSubwindowsReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xCompositeRedirectSubwindowsReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client,
|
VERIFY_WINDOW(pWin, stuff->window, client,
|
||||||
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
||||||
|
|
||||||
|
@ -167,13 +163,10 @@ ProcCompositeRedirectSubwindows(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeUnredirectWindow(ClientPtr client)
|
SingleCompositeUnredirectWindow(ClientPtr client, xCompositeUnredirectWindowReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xCompositeUnredirectWindowReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client,
|
VERIFY_WINDOW(pWin, stuff->window, client,
|
||||||
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
||||||
|
|
||||||
|
@ -181,13 +174,10 @@ ProcCompositeUnredirectWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeUnredirectSubwindows(ClientPtr client)
|
SingleCompositeUnredirectSubwindows(ClientPtr client, xCompositeUnredirectSubwindowsReq* stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
REQUEST(xCompositeUnredirectSubwindowsReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client,
|
VERIFY_WINDOW(pWin, stuff->window, client,
|
||||||
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
DixSetAttrAccess | DixManageAccess | DixBlendAccess);
|
||||||
|
|
||||||
|
@ -224,7 +214,7 @@ ProcCompositeCreateRegionFromBorderClip(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeNameWindowPixmap(ClientPtr client)
|
SingleCompositeNameWindowPixmap(ClientPtr client, xCompositeNameWindowPixmapReq *stuff)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CompWindowPtr cw;
|
CompWindowPtr cw;
|
||||||
|
@ -232,9 +222,6 @@ ProcCompositeNameWindowPixmap(ClientPtr client)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xCompositeNameWindowPixmapReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
|
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
@ -275,9 +262,8 @@ ProcCompositeNameWindowPixmap(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeGetOverlayWindow(ClientPtr client)
|
SingleCompositeGetOverlayWindow(ClientPtr client, xCompositeGetOverlayWindowReq *stuff)
|
||||||
{
|
{
|
||||||
REQUEST(xCompositeGetOverlayWindowReq);
|
|
||||||
xCompositeGetOverlayWindowReply rep;
|
xCompositeGetOverlayWindowReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
@ -285,7 +271,6 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
|
||||||
CompOverlayClientPtr pOc;
|
CompOverlayClientPtr pOc;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
|
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
|
@ -333,13 +318,11 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcCompositeReleaseOverlayWindow(ClientPtr client)
|
SingleCompositeReleaseOverlayWindow(ClientPtr client, xCompositeReleaseOverlayWindowReq *stuff)
|
||||||
{
|
{
|
||||||
REQUEST(xCompositeReleaseOverlayWindowReq);
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CompOverlayClientPtr pOc;
|
CompOverlayClientPtr pOc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
|
|
||||||
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
|
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -356,6 +339,14 @@ ProcCompositeReleaseOverlayWindow(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ProcCompositeRedirectWindow(ClientPtr client);
|
||||||
|
static int ProcCompositeRedirectSubwindows(ClientPtr client);
|
||||||
|
static int ProcCompositeUnredirectWindow(ClientPtr client);
|
||||||
|
static int ProcCompositeReleaseOverlayWindow(ClientPtr client);
|
||||||
|
static int ProcCompositeUnredirectSubwindows(ClientPtr client);
|
||||||
|
static int ProcCompositeNameWindowPixmap(ClientPtr client);
|
||||||
|
static int ProcCompositeGetOverlayWindow(ClientPtr client);
|
||||||
|
|
||||||
static int (*ProcCompositeVector[CompositeNumberRequests]) (ClientPtr) = {
|
static int (*ProcCompositeVector[CompositeNumberRequests]) (ClientPtr) = {
|
||||||
ProcCompositeQueryVersion,
|
ProcCompositeQueryVersion,
|
||||||
ProcCompositeRedirectWindow,
|
ProcCompositeRedirectWindow,
|
||||||
|
@ -572,20 +563,19 @@ CompositeExtensionInit(void)
|
||||||
noCompositeExtension = FALSE;
|
noCompositeExtension = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
|
|
||||||
int (*PanoramiXSaveCompositeVector[CompositeNumberRequests]) (ClientPtr);
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXCompositeRedirectWindow(ClientPtr client)
|
ProcCompositeRedirectWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
PanoramiXRes *win;
|
|
||||||
int rc = 0, j;
|
|
||||||
|
|
||||||
REQUEST(xCompositeRedirectWindowReq);
|
REQUEST(xCompositeRedirectWindowReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
|
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!compositeUseXinerama)
|
||||||
|
return SingleCompositeRedirectWindow(client, stuff);
|
||||||
|
|
||||||
|
PanoramiXRes *win;
|
||||||
|
int rc = 0, j;
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
client, DixUnknownAccess))) {
|
client, DixUnknownAccess))) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
@ -594,24 +584,30 @@ PanoramiXCompositeRedirectWindow(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
stuff->window = win->info[j].id;
|
stuff->window = win->info[j].id;
|
||||||
rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
|
rc = SingleCompositeRedirectWindow(client, stuff);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
#else
|
||||||
|
return SingleCompositeRedirectWindow(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXCompositeRedirectSubwindows(ClientPtr client)
|
ProcCompositeRedirectSubwindows(ClientPtr client)
|
||||||
{
|
{
|
||||||
PanoramiXRes *win;
|
|
||||||
int rc = 0, j;
|
|
||||||
|
|
||||||
REQUEST(xCompositeRedirectSubwindowsReq);
|
REQUEST(xCompositeRedirectSubwindowsReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
|
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!compositeUseXinerama)
|
||||||
|
return SingleRedirectSubwindows(client, stuff);
|
||||||
|
|
||||||
|
PanoramiXRes *win;
|
||||||
|
int rc = 0, j;
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
client, DixUnknownAccess))) {
|
client, DixUnknownAccess))) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
@ -620,50 +616,62 @@ PanoramiXCompositeRedirectSubwindows(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
stuff->window = win->info[j].id;
|
stuff->window = win->info[j].id;
|
||||||
rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
|
rc = SingleRedirectSubwindows(client, stuff);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
#else
|
||||||
|
return SingleRedirectSubwindows(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXCompositeUnredirectWindow(ClientPtr client)
|
ProcCompositeUnredirectWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
PanoramiXRes *win;
|
|
||||||
int rc = 0, j;
|
|
||||||
|
|
||||||
REQUEST(xCompositeUnredirectWindowReq);
|
REQUEST(xCompositeUnredirectWindowReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
|
REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
#ifdef XINERAMA
|
||||||
client, DixUnknownAccess))) {
|
if (!compositeUseXinerama)
|
||||||
client->errorValue = stuff->window;
|
return SingleCompositeUnredirectWindow(client, stuff);
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
|
||||||
stuff->window = win->info[j].id;
|
|
||||||
rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
|
|
||||||
if (rc != Success)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
PanoramiXCompositeUnredirectSubwindows(ClientPtr client)
|
|
||||||
{
|
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int rc = 0, j;
|
int rc = 0, j;
|
||||||
|
|
||||||
REQUEST(xCompositeUnredirectSubwindowsReq);
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
|
client, DixUnknownAccess))) {
|
||||||
|
client->errorValue = stuff->window;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
|
stuff->window = win->info[j].id;
|
||||||
|
rc = SingleCompositeUnredirectWindow(client, stuff);
|
||||||
|
if (rc != Success)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
#else
|
||||||
|
return SingleCompositeUnredirectWindow(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ProcCompositeUnredirectSubwindows(ClientPtr client)
|
||||||
|
{
|
||||||
|
REQUEST(xCompositeUnredirectSubwindowsReq);
|
||||||
REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
|
REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!compositeUseXinerama)
|
||||||
|
return SingleCompositeUnredirectSubwindows(client, stuff);
|
||||||
|
|
||||||
|
PanoramiXRes *win;
|
||||||
|
int rc = 0, j;
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
client, DixUnknownAccess))) {
|
client, DixUnknownAccess))) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
@ -672,17 +680,27 @@ PanoramiXCompositeUnredirectSubwindows(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
stuff->window = win->info[j].id;
|
stuff->window = win->info[j].id;
|
||||||
rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
|
rc = SingleCompositeUnredirectSubwindows(client, stuff);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
#else
|
||||||
|
return SingleCompositeUnredirectSubwindows(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXCompositeNameWindowPixmap(ClientPtr client)
|
ProcCompositeNameWindowPixmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xCompositeNameWindowPixmapReq);
|
||||||
|
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!compositeUseXinerama)
|
||||||
|
return SingleCompositeNameWindowPixmap(client, stuff);
|
||||||
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CompWindowPtr cw;
|
CompWindowPtr cw;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
@ -690,10 +708,6 @@ PanoramiXCompositeNameWindowPixmap(ClientPtr client)
|
||||||
PanoramiXRes *win, *newPix;
|
PanoramiXRes *win, *newPix;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
REQUEST(xCompositeNameWindowPixmapReq);
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
|
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
client, DixUnknownAccess))) {
|
client, DixUnknownAccess))) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
@ -746,12 +760,21 @@ PanoramiXCompositeNameWindowPixmap(ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
#else
|
||||||
|
return SingleCompositeNameWindowPixmap(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
ProcCompositeGetOverlayWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xCompositeGetOverlayWindowReq);
|
REQUEST(xCompositeGetOverlayWindowReq);
|
||||||
|
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!compositeUseXinerama)
|
||||||
|
return SingleCompositeGetOverlayWindow(client, stuff);
|
||||||
|
|
||||||
xCompositeGetOverlayWindowReply rep;
|
xCompositeGetOverlayWindowReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
@ -761,8 +784,6 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
||||||
PanoramiXRes *win, *overlayWin = NULL;
|
PanoramiXRes *win, *overlayWin = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
|
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
client, DixUnknownAccess))) {
|
client, DixUnknownAccess))) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
@ -845,21 +866,27 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
||||||
swapl(&rep.overlayWin);
|
swapl(&rep.overlayWin);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep);
|
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
#else
|
||||||
|
return SingleCompositeGetOverlayWindow(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PanoramiXCompositeReleaseOverlayWindow(ClientPtr client)
|
ProcCompositeReleaseOverlayWindow(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xCompositeReleaseOverlayWindowReq);
|
REQUEST(xCompositeReleaseOverlayWindowReq);
|
||||||
|
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
|
if (!compositeUseXinerama)
|
||||||
|
return SingleCompositeReleaseOverlayWindow(client, stuff);
|
||||||
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CompOverlayClientPtr pOc;
|
CompOverlayClientPtr pOc;
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int i, rc;
|
int i, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
|
|
||||||
|
|
||||||
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW,
|
||||||
client, DixUnknownAccess))) {
|
client, DixUnknownAccess))) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
@ -887,41 +914,21 @@ PanoramiXCompositeReleaseOverlayWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
#else
|
||||||
|
return SingleCompositeReleaseOverlayWindow(client, stuff);
|
||||||
|
#endif /* XINERAMA */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
void
|
void
|
||||||
PanoramiXCompositeInit(void)
|
PanoramiXCompositeInit(void)
|
||||||
{
|
{
|
||||||
int i;
|
compositeUseXinerama = 1;
|
||||||
|
|
||||||
for (i = 0; i < CompositeNumberRequests; i++)
|
|
||||||
PanoramiXSaveCompositeVector[i] = ProcCompositeVector[i];
|
|
||||||
/*
|
|
||||||
* Stuff in Xinerama aware request processing hooks
|
|
||||||
*/
|
|
||||||
ProcCompositeVector[X_CompositeRedirectWindow] =
|
|
||||||
PanoramiXCompositeRedirectWindow;
|
|
||||||
ProcCompositeVector[X_CompositeRedirectSubwindows] =
|
|
||||||
PanoramiXCompositeRedirectSubwindows;
|
|
||||||
ProcCompositeVector[X_CompositeUnredirectWindow] =
|
|
||||||
PanoramiXCompositeUnredirectWindow;
|
|
||||||
ProcCompositeVector[X_CompositeUnredirectSubwindows] =
|
|
||||||
PanoramiXCompositeUnredirectSubwindows;
|
|
||||||
ProcCompositeVector[X_CompositeNameWindowPixmap] =
|
|
||||||
PanoramiXCompositeNameWindowPixmap;
|
|
||||||
ProcCompositeVector[X_CompositeGetOverlayWindow] =
|
|
||||||
PanoramiXCompositeGetOverlayWindow;
|
|
||||||
ProcCompositeVector[X_CompositeReleaseOverlayWindow] =
|
|
||||||
PanoramiXCompositeReleaseOverlayWindow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PanoramiXCompositeReset(void)
|
PanoramiXCompositeReset(void)
|
||||||
{
|
{
|
||||||
int i;
|
compositeUseXinerama = 0;
|
||||||
|
|
||||||
for (i = 0; i < CompositeNumberRequests; i++)
|
|
||||||
ProcCompositeVector[i] = PanoramiXSaveCompositeVector[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
Loading…
Reference in New Issue