Merge remote-tracking branch 'airlied/xinerama-cleanup'
This commit is contained in:
commit
03f45df934
|
@ -393,7 +393,7 @@ static void XineramaInitData(ScreenPtr pScreen)
|
||||||
int i, w, h;
|
int i, w, h;
|
||||||
|
|
||||||
RegionNull(&PanoramiXScreenRegion);
|
RegionNull(&PanoramiXScreenRegion);
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
BoxRec TheBox;
|
BoxRec TheBox;
|
||||||
RegionRec ScreenRegion;
|
RegionRec ScreenRegion;
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ static void XineramaInitData(ScreenPtr pScreen)
|
||||||
PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
|
PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
|
||||||
PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
|
PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
|
||||||
|
|
||||||
for (i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
w = pScreen->x + pScreen->width;
|
w = pScreen->x + pScreen->width;
|
||||||
h = pScreen->y + pScreen->height;
|
h = pScreen->y + pScreen->height;
|
||||||
|
@ -478,7 +478,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
|
||||||
* run in non-PanoramiXeen mode.
|
* run in non-PanoramiXeen mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
|
pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
|
||||||
dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
|
dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
|
||||||
|
@ -740,7 +740,7 @@ PanoramiXMaybeAddDepth(DepthPtr pDepth)
|
||||||
int j, k;
|
int j, k;
|
||||||
Bool found = FALSE;
|
Bool found = FALSE;
|
||||||
|
|
||||||
for (j = 1; j < PanoramiXNumScreens; j++) {
|
FOR_NSCREENS_FORWARD_SKIP(j) {
|
||||||
pScreen = screenInfo.screens[j];
|
pScreen = screenInfo.screens[j];
|
||||||
for (k = 0; k < pScreen->numDepths; k++) {
|
for (k = 0; k < pScreen->numDepths; k++) {
|
||||||
if (pScreen->allowedDepths[k].depth == pDepth->depth) {
|
if (pScreen->allowedDepths[k].depth == pDepth->depth) {
|
||||||
|
@ -773,7 +773,7 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual)
|
||||||
int j, k;
|
int j, k;
|
||||||
Bool found = FALSE;
|
Bool found = FALSE;
|
||||||
|
|
||||||
for (j = 1; j < PanoramiXNumScreens; j++) {
|
FOR_NSCREENS_FORWARD_SKIP(j) {
|
||||||
pScreen = screenInfo.screens[j];
|
pScreen = screenInfo.screens[j];
|
||||||
found = FALSE;
|
found = FALSE;
|
||||||
|
|
||||||
|
@ -836,7 +836,7 @@ PanoramiXConsolidate(void)
|
||||||
saver = malloc(sizeof(PanoramiXRes));
|
saver = malloc(sizeof(PanoramiXRes));
|
||||||
saver->type = XRT_WINDOW;
|
saver->type = XRT_WINDOW;
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
ScreenPtr pScreen = screenInfo.screens[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
root->info[i].id = pScreen->root->drawable.id;
|
root->info[i].id = pScreen->root->drawable.id;
|
||||||
root->u.win.class = InputOutput;
|
root->u.win.class = InputOutput;
|
||||||
|
@ -1074,7 +1074,7 @@ ProcXineramaQueryScreens(ClientPtr client)
|
||||||
xXineramaScreenInfo scratch;
|
xXineramaScreenInfo scratch;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
scratch.x_org = screenInfo.screens[i]->x;
|
scratch.x_org = screenInfo.screens[i]->x;
|
||||||
scratch.y_org = screenInfo.screens[i]->y;
|
scratch.y_org = screenInfo.screens[i]->y;
|
||||||
scratch.width = screenInfo.screens[i]->width;
|
scratch.width = screenInfo.screens[i]->width;
|
||||||
|
@ -1179,7 +1179,7 @@ XineramaGetImageData(
|
||||||
|
|
||||||
depth = (format == XYPixmap) ? 1 : pDraw->depth;
|
depth = (format == XYPixmap) ? 1 : pDraw->depth;
|
||||||
|
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
BoxRec TheBox;
|
BoxRec TheBox;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
pDraw = pDrawables[i];
|
pDraw = pDrawables[i];
|
||||||
|
|
|
@ -44,7 +44,7 @@ Equipment Corporation.
|
||||||
#include <X11/extensions/panoramiXproto.h>
|
#include <X11/extensions/panoramiXproto.h>
|
||||||
#undef _PANORAMIX_SERVER
|
#undef _PANORAMIX_SERVER
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
|
#include "dixstruct.h"
|
||||||
|
|
||||||
typedef struct _PanoramiXInfo {
|
typedef struct _PanoramiXInfo {
|
||||||
XID id ;
|
XID id ;
|
||||||
|
@ -70,9 +70,11 @@ typedef struct {
|
||||||
} PanoramiXRes;
|
} PanoramiXRes;
|
||||||
|
|
||||||
#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
|
#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
|
||||||
|
#define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++)
|
||||||
#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
|
#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
|
||||||
#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
|
#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
|
||||||
|
|
||||||
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
|
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
|
||||||
|
|
||||||
|
#define IS_ROOT_DRAWABLE(d) (((d)->type == XRT_WINDOW) && (d)->u.win.root)
|
||||||
#endif /* _PANORAMIX_H_ */
|
#endif /* _PANORAMIX_H_ */
|
||||||
|
|
|
@ -120,9 +120,7 @@ int PanoramiXCreateWindow(ClientPtr client)
|
||||||
newWin->u.win.visibility = VisibilityNotViewable;
|
newWin->u.win.visibility = VisibilityNotViewable;
|
||||||
newWin->u.win.class = stuff->class;
|
newWin->u.win.class = stuff->class;
|
||||||
newWin->u.win.root = FALSE;
|
newWin->u.win.root = FALSE;
|
||||||
newWin->info[0].id = stuff->wid;
|
panoramix_setup_ids(newWin, client, stuff->wid);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newWin->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
if (stuff->class == InputOnly)
|
if (stuff->class == InputOnly)
|
||||||
stuff->visual = CopyFromParent;
|
stuff->visual = CopyFromParent;
|
||||||
|
@ -663,9 +661,7 @@ int PanoramiXCreatePixmap(ClientPtr client)
|
||||||
|
|
||||||
newPix->type = XRT_PIXMAP;
|
newPix->type = XRT_PIXMAP;
|
||||||
newPix->u.pix.shared = FALSE;
|
newPix->u.pix.shared = FALSE;
|
||||||
newPix->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPix, client, stuff->pid);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPix->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->pid = newPix->info[j].id;
|
stuff->pid = newPix->info[j].id;
|
||||||
|
@ -767,9 +763,7 @@ int PanoramiXCreateGC(ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newGC->type = XRT_GC;
|
newGC->type = XRT_GC;
|
||||||
newGC->info[0].id = stuff->gc;
|
panoramix_setup_ids(newGC, client, stuff->gc);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newGC->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->gc = newGC->info[j].id;
|
stuff->gc = newGC->info[j].id;
|
||||||
|
@ -1334,7 +1328,7 @@ int PanoramiXPolyLine(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq));
|
npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq));
|
||||||
if (npoint > 0){
|
if (npoint > 0){
|
||||||
origPts = malloc(npoint * sizeof(xPoint));
|
origPts = malloc(npoint * sizeof(xPoint));
|
||||||
|
@ -1394,7 +1388,7 @@ int PanoramiXPolySegment(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
|
nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
|
||||||
if(nsegs & 4) return BadLength;
|
if(nsegs & 4) return BadLength;
|
||||||
|
@ -1457,7 +1451,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
|
nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
|
||||||
if(nrects & 4) return BadLength;
|
if(nrects & 4) return BadLength;
|
||||||
|
@ -1519,7 +1513,7 @@ int PanoramiXPolyArc(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
|
narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
|
||||||
if(narcs % sizeof(xArc)) return BadLength;
|
if(narcs % sizeof(xArc)) return BadLength;
|
||||||
|
@ -1579,7 +1573,7 @@ int PanoramiXFillPoly(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
count = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq));
|
count = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq));
|
||||||
if (count > 0){
|
if (count > 0){
|
||||||
|
@ -1640,7 +1634,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);
|
things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);
|
||||||
if(things & 4) return BadLength;
|
if(things & 4) return BadLength;
|
||||||
|
@ -1701,7 +1695,7 @@ int PanoramiXPolyFillArc(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
|
narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
|
||||||
if (narcs % sizeof(xArc)) return BadLength;
|
if (narcs % sizeof(xArc)) return BadLength;
|
||||||
|
@ -1761,7 +1755,7 @@ int PanoramiXPutImage(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
orig_x = stuff->dstX;
|
orig_x = stuff->dstX;
|
||||||
orig_y = stuff->dstY;
|
orig_y = stuff->dstY;
|
||||||
|
@ -1824,7 +1818,7 @@ int PanoramiXGetImage(ClientPtr client)
|
||||||
format = stuff->format;
|
format = stuff->format;
|
||||||
planemask = stuff->planeMask;
|
planemask = stuff->planeMask;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
if(isRoot) {
|
if(isRoot) {
|
||||||
if( /* check for being onscreen */
|
if( /* check for being onscreen */
|
||||||
|
@ -1846,7 +1840,7 @@ int PanoramiXGetImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawables[0] = pDraw;
|
drawables[0] = pDraw;
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
|
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
|
||||||
DixGetAttrAccess);
|
DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -1962,7 +1956,7 @@ PanoramiXPolyText8(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
orig_x = stuff->x;
|
orig_x = stuff->x;
|
||||||
orig_y = stuff->y;
|
orig_y = stuff->y;
|
||||||
|
@ -2003,7 +1997,7 @@ PanoramiXPolyText16(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
orig_x = stuff->x;
|
orig_x = stuff->x;
|
||||||
orig_y = stuff->y;
|
orig_y = stuff->y;
|
||||||
|
@ -2044,7 +2038,7 @@ int PanoramiXImageText8(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
orig_x = stuff->x;
|
orig_x = stuff->x;
|
||||||
orig_y = stuff->y;
|
orig_y = stuff->y;
|
||||||
|
@ -2085,7 +2079,7 @@ int PanoramiXImageText16(ClientPtr client)
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
|
isRoot = IS_ROOT_DRAWABLE(draw);
|
||||||
|
|
||||||
orig_x = stuff->x;
|
orig_x = stuff->x;
|
||||||
orig_y = stuff->y;
|
orig_y = stuff->y;
|
||||||
|
@ -2121,9 +2115,7 @@ int PanoramiXCreateColormap(ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newCmap->type = XRT_COLORMAP;
|
newCmap->type = XRT_COLORMAP;
|
||||||
newCmap->info[0].id = stuff->mid;
|
panoramix_setup_ids(newCmap, client, stuff->mid);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newCmap->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
orig_visual = stuff->visual;
|
orig_visual = stuff->visual;
|
||||||
FOR_NSCREENS_BACKWARD(j){
|
FOR_NSCREENS_BACKWARD(j){
|
||||||
|
@ -2192,11 +2184,9 @@ PanoramiXCopyColormapAndFree(ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newCmap->type = XRT_COLORMAP;
|
newCmap->type = XRT_COLORMAP;
|
||||||
newCmap->info[0].id = stuff->mid;
|
panoramix_setup_ids(newCmap, client, stuff->mid);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newCmap->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j){
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->srcCmap = cmap->info[j].id;
|
stuff->srcCmap = cmap->info[j].id;
|
||||||
stuff->mid = newCmap->info[j].id;
|
stuff->mid = newCmap->info[j].id;
|
||||||
result = (* SavedProcVector[X_CopyColormapAndFree])(client);
|
result = (* SavedProcVector[X_CopyColormapAndFree])(client);
|
||||||
|
|
|
@ -51,4 +51,15 @@ extern _X_EXPORT void XineramaGetImageData(
|
||||||
Bool isRoot
|
Bool isRoot
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static inline void panoramix_setup_ids(PanoramiXRes *resource,
|
||||||
|
ClientPtr client, XID base_id)
|
||||||
|
{
|
||||||
|
int j;
|
||||||
|
|
||||||
|
resource->info[0].id = base_id;
|
||||||
|
FOR_NSCREENS_FORWARD_SKIP(j) {
|
||||||
|
resource->info[j].id = FakeClientID(client->index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _PANORAMIXSRV_H_ */
|
#endif /* _PANORAMIXSRV_H_ */
|
||||||
|
|
|
@ -848,7 +848,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
drawables[0] = pDraw;
|
drawables[0] = pDraw;
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
|
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
|
||||||
DixReadAccess);
|
DixReadAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -972,9 +972,7 @@ CreatePmap:
|
||||||
|
|
||||||
newPix->type = XRT_PIXMAP;
|
newPix->type = XRT_PIXMAP;
|
||||||
newPix->u.pix.shared = TRUE;
|
newPix->u.pix.shared = TRUE;
|
||||||
newPix->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPix, client, stuff->pid);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPix->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
result = Success;
|
result = Success;
|
||||||
|
|
||||||
|
|
|
@ -1918,7 +1918,7 @@ void XineramifyXv(void)
|
||||||
|
|
||||||
MatchingAdaptors[0] = refAdapt;
|
MatchingAdaptors[0] = refAdapt;
|
||||||
isOverlay = hasOverlay(refAdapt);
|
isOverlay = hasOverlay(refAdapt);
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
FOR_NSCREENS_FORWARD_SKIP(j)
|
||||||
MatchingAdaptors[j] = matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay);
|
MatchingAdaptors[j] = matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay);
|
||||||
|
|
||||||
/* now create a resource for each port */
|
/* now create a resource for each port */
|
||||||
|
@ -1927,7 +1927,7 @@ void XineramifyXv(void)
|
||||||
if(!port)
|
if(!port)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for(k = 0; k < PanoramiXNumScreens; k++) {
|
FOR_NSCREENS(k) {
|
||||||
if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j))
|
if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j))
|
||||||
port->info[k].id = MatchingAdaptors[k]->base_id + j;
|
port->info[k].id = MatchingAdaptors[k]->base_id + j;
|
||||||
else
|
else
|
||||||
|
|
|
@ -703,10 +703,7 @@ PanoramiXCompositeNameWindowPixmap (ClientPtr client)
|
||||||
|
|
||||||
newPix->type = XRT_PIXMAP;
|
newPix->type = XRT_PIXMAP;
|
||||||
newPix->u.pix.shared = FALSE;
|
newPix->u.pix.shared = FALSE;
|
||||||
newPix->info[0].id = stuff->pixmap;
|
panoramix_setup_ids(newPix, client, stuff->pixmap);
|
||||||
|
|
||||||
for (i = 1; i < PanoramiXNumScreens; i++)
|
|
||||||
newPix->info[i].id = FakeClientID (client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS(i) {
|
FOR_NSCREENS(i) {
|
||||||
rc = dixLookupResourceByType ((void **) &pWin, win->info[i].id,
|
rc = dixLookupResourceByType ((void **) &pWin, win->info[i].id,
|
||||||
|
|
10
dix/events.c
10
dix/events.c
|
@ -558,7 +558,7 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
|
|
||||||
if(pWin == screenInfo.screens[0]->root) {
|
if(pWin == screenInfo.screens[0]->root) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++)
|
FOR_NSCREENS(i)
|
||||||
pSprite->windows[i] = screenInfo.screens[i]->root;
|
pSprite->windows[i] = screenInfo.screens[i]->root;
|
||||||
} else {
|
} else {
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
|
@ -569,7 +569,7 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
rc = dixLookupWindow(pSprite->windows + i, win->info[i].id,
|
rc = dixLookupWindow(pSprite->windows + i, win->info[i].id,
|
||||||
serverClient, DixReadAccess);
|
serverClient, DixReadAccess);
|
||||||
if (rc != Success) /* window is being unmapped */
|
if (rc != Success) /* window is being unmapped */
|
||||||
|
@ -2554,7 +2554,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
||||||
SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite;
|
SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
|
if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
|
||||||
x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
|
x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
|
||||||
y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
|
y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
|
||||||
|
@ -3153,7 +3153,7 @@ XineramaPointInWindowIsVisible(
|
||||||
xoff = x + screenInfo.screens[0]->x;
|
xoff = x + screenInfo.screens[0]->x;
|
||||||
yoff = y + screenInfo.screens[0]->y;
|
yoff = y + screenInfo.screens[0]->y;
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
|
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
|
||||||
x = xoff - screenInfo.screens[i]->x;
|
x = xoff - screenInfo.screens[i]->x;
|
||||||
y = yoff - screenInfo.screens[i]->y;
|
y = yoff - screenInfo.screens[i]->y;
|
||||||
|
@ -3360,7 +3360,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
if(!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) {
|
if(!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
if(RegionNotEmpty(&pDev->spriteInfo->sprite->windows[i]->borderSize))
|
if(RegionNotEmpty(&pDev->spriteInfo->sprite->windows[i]->borderSize))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3067,7 +3067,7 @@ SendVisibilityNotify(WindowPtr pWin)
|
||||||
|
|
||||||
switch(visibility) {
|
switch(visibility) {
|
||||||
case VisibilityUnobscured:
|
case VisibilityUnobscured:
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
if(i == Scrnum) continue;
|
if(i == Scrnum) continue;
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient,
|
rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient,
|
||||||
|
@ -3089,7 +3089,7 @@ SendVisibilityNotify(WindowPtr pWin)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VisibilityFullyObscured:
|
case VisibilityFullyObscured:
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
if(i == Scrnum) continue;
|
if(i == Scrnum) continue;
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient,
|
rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient,
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
extern int connBlockScreenStart;
|
extern int connBlockScreenStart;
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
|
#include "panoramiXsrv.h"
|
||||||
extern int PanoramiXPixWidth;
|
extern int PanoramiXPixWidth;
|
||||||
extern int PanoramiXPixHeight;
|
extern int PanoramiXPixHeight;
|
||||||
extern int PanoramiXNumScreens;
|
extern int PanoramiXNumScreens;
|
||||||
|
@ -137,7 +138,7 @@ void dmxConnectionBlockCallback(void)
|
||||||
}
|
}
|
||||||
dmxLog(dmxInfo, "%d screens configured with Xinerama (%d %d)\n",
|
dmxLog(dmxInfo, "%d screens configured with Xinerama (%d %d)\n",
|
||||||
PanoramiXNumScreens, PanoramiXPixWidth, PanoramiXPixHeight);
|
PanoramiXNumScreens, PanoramiXPixWidth, PanoramiXPixHeight);
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) found[i] = FALSE;
|
FOR_NSCREENS(i) found[i] = FALSE;
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
/* This never happens because we're
|
/* This never happens because we're
|
||||||
|
@ -177,7 +178,7 @@ void dmxConnectionBlockCallback(void)
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
int k;
|
int k;
|
||||||
for (k = 0; k < PanoramiXNumScreens; k++) {
|
FOR_NSCREENS(k) {
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[k];
|
DMXScreenInfo *dmxScreen = &dmxScreens[k];
|
||||||
|
|
||||||
if (dmxScreen->beDisplay) {
|
if (dmxScreen->beDisplay) {
|
||||||
|
@ -203,7 +204,7 @@ void dmxConnectionBlockCallback(void)
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
Bool fatal = FALSE;
|
Bool fatal = FALSE;
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
fatal |= !found[i];
|
fatal |= !found[i];
|
||||||
if (!found[i]) {
|
if (!found[i]) {
|
||||||
dmxLog(dmxError,
|
dmxLog(dmxError,
|
||||||
|
|
|
@ -703,7 +703,7 @@ static void dmxBERestorePixmapImage(pointer value, XID id, RESTYPE type,
|
||||||
RT_PIXMAP, NullClient, DixUnknownAccess);
|
RT_PIXMAP, NullClient, DixUnknownAccess);
|
||||||
if (pPix != pDst) return; /* Not a match.... Next! */
|
if (pPix != pDst) return; /* Not a match.... Next! */
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
PixmapPtr pSrc;
|
PixmapPtr pSrc;
|
||||||
dmxPixPrivPtr pSrcPriv = NULL;
|
dmxPixPrivPtr pSrcPriv = NULL;
|
||||||
|
|
||||||
|
@ -1372,7 +1372,7 @@ static void dmxBEFindPixmapImage(pointer value, XID id, RESTYPE type,
|
||||||
RT_PIXMAP, NullClient, DixUnknownAccess);
|
RT_PIXMAP, NullClient, DixUnknownAccess);
|
||||||
if (pPix != pDst) return; /* Not a match.... Next! */
|
if (pPix != pDst) return; /* Not a match.... Next! */
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS(i) {
|
||||||
PixmapPtr pSrc;
|
PixmapPtr pSrc;
|
||||||
dmxPixPrivPtr pSrcPriv = NULL;
|
dmxPixPrivPtr pSrcPriv = NULL;
|
||||||
|
|
||||||
|
|
|
@ -529,7 +529,7 @@ static DMXScreenInfo *dmxFindAlternatePixmap(DrawablePtr pDrawable, XID *draw)
|
||||||
NullClient, DixUnknownAccess))
|
NullClient, DixUnknownAccess))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 1; i < PanoramiXNumScreens; i++) {
|
FOR_NSCREENS_FORWARD_SKIP(i) {
|
||||||
dmxScreen = &dmxScreens[i];
|
dmxScreen = &dmxScreens[i];
|
||||||
if (dmxScreen->beDisplay) {
|
if (dmxScreen->beDisplay) {
|
||||||
PixmapPtr pSrc;
|
PixmapPtr pSrc;
|
||||||
|
|
|
@ -2690,7 +2690,7 @@ PanoramiXRenderCreatePicture (ClientPtr client)
|
||||||
if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
|
if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes))))
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
newPict->type = XRT_PICTURE;
|
newPict->type = XRT_PICTURE;
|
||||||
newPict->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||||
|
|
||||||
if (refDraw->type == XRT_WINDOW &&
|
if (refDraw->type == XRT_WINDOW &&
|
||||||
stuff->drawable == screenInfo.screens[0]->root->drawable.id)
|
stuff->drawable == screenInfo.screens[0]->root->drawable.id)
|
||||||
|
@ -2699,9 +2699,6 @@ PanoramiXRenderCreatePicture (ClientPtr client)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
newPict->u.pict.root = FALSE;
|
newPict->u.pict.root = FALSE;
|
||||||
|
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPict->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->pid = newPict->info[j].id;
|
stuff->pid = newPict->info[j].id;
|
||||||
|
@ -3225,11 +3222,8 @@ PanoramiXRenderCreateSolidFill (ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newPict->type = XRT_PICTURE;
|
newPict->type = XRT_PICTURE;
|
||||||
newPict->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||||
newPict->u.pict.root = FALSE;
|
newPict->u.pict.root = FALSE;
|
||||||
|
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPict->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->pid = newPict->info[j].id;
|
stuff->pid = newPict->info[j].id;
|
||||||
|
@ -3258,12 +3252,9 @@ PanoramiXRenderCreateLinearGradient (ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newPict->type = XRT_PICTURE;
|
newPict->type = XRT_PICTURE;
|
||||||
newPict->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||||
newPict->u.pict.root = FALSE;
|
newPict->u.pict.root = FALSE;
|
||||||
|
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPict->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->pid = newPict->info[j].id;
|
stuff->pid = newPict->info[j].id;
|
||||||
result = (*PanoramiXSaveRenderVector[X_RenderCreateLinearGradient]) (client);
|
result = (*PanoramiXSaveRenderVector[X_RenderCreateLinearGradient]) (client);
|
||||||
|
@ -3291,12 +3282,9 @@ PanoramiXRenderCreateRadialGradient (ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newPict->type = XRT_PICTURE;
|
newPict->type = XRT_PICTURE;
|
||||||
newPict->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||||
newPict->u.pict.root = FALSE;
|
newPict->u.pict.root = FALSE;
|
||||||
|
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPict->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->pid = newPict->info[j].id;
|
stuff->pid = newPict->info[j].id;
|
||||||
result = (*PanoramiXSaveRenderVector[X_RenderCreateRadialGradient]) (client);
|
result = (*PanoramiXSaveRenderVector[X_RenderCreateRadialGradient]) (client);
|
||||||
|
@ -3324,12 +3312,9 @@ PanoramiXRenderCreateConicalGradient (ClientPtr client)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
newPict->type = XRT_PICTURE;
|
newPict->type = XRT_PICTURE;
|
||||||
newPict->info[0].id = stuff->pid;
|
panoramix_setup_ids(newPict, client, stuff->pid);
|
||||||
newPict->u.pict.root = FALSE;
|
newPict->u.pict.root = FALSE;
|
||||||
|
|
||||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
|
||||||
newPict->info[j].id = FakeClientID(client->index);
|
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->pid = newPict->info[j].id;
|
stuff->pid = newPict->info[j].id;
|
||||||
result = (*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient]) (client);
|
result = (*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient]) (client);
|
||||||
|
|
Loading…
Reference in New Issue