Merge remote branch 'jamey/for-keith'
This commit is contained in:
commit
0f12e86e60
103
Xext/panoramiX.c
103
Xext/panoramiX.c
|
@ -70,7 +70,6 @@ int PanoramiXPixWidth = 0;
|
||||||
int PanoramiXPixHeight = 0;
|
int PanoramiXPixHeight = 0;
|
||||||
int PanoramiXNumScreens = 0;
|
int PanoramiXNumScreens = 0;
|
||||||
|
|
||||||
PanoramiXData *panoramiXdataPtr = NULL;
|
|
||||||
static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
|
static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
|
||||||
|
|
||||||
static int PanoramiXNumDepths;
|
static int PanoramiXNumDepths;
|
||||||
|
@ -120,8 +119,6 @@ typedef struct {
|
||||||
CloseScreenProcPtr CloseScreen;
|
CloseScreenProcPtr CloseScreen;
|
||||||
} PanoramiXScreenRec, *PanoramiXScreenPtr;
|
} PanoramiXScreenRec, *PanoramiXScreenPtr;
|
||||||
|
|
||||||
RegionRec XineramaScreenRegions[MAXSCREENS];
|
|
||||||
|
|
||||||
static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr);
|
static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr);
|
||||||
static void XineramaChangeGC(GCPtr, unsigned long);
|
static void XineramaChangeGC(GCPtr, unsigned long);
|
||||||
static void XineramaCopyGC(GCPtr, unsigned long, GCPtr);
|
static void XineramaCopyGC(GCPtr, unsigned long, GCPtr);
|
||||||
|
@ -154,7 +151,6 @@ XineramaCloseScreen (int i, ScreenPtr pScreen)
|
||||||
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
||||||
pScreen->CreateGC = pScreenPriv->CreateGC;
|
pScreen->CreateGC = pScreenPriv->CreateGC;
|
||||||
|
|
||||||
REGION_UNINIT(pScreen, &XineramaScreenRegions[pScreen->myNum]);
|
|
||||||
if (pScreen->myNum == 0)
|
if (pScreen->myNum == 0)
|
||||||
REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
|
REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
|
||||||
|
|
||||||
|
@ -199,8 +195,8 @@ XineramaValidateGC(
|
||||||
|
|
||||||
if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) {
|
if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) {
|
||||||
/* the root window */
|
/* the root window */
|
||||||
int x_off = panoramiXdataPtr[pGC->pScreen->myNum].x;
|
int x_off = pGC->pScreen->x;
|
||||||
int y_off = panoramiXdataPtr[pGC->pScreen->myNum].y;
|
int y_off = pGC->pScreen->y;
|
||||||
int new_val;
|
int new_val;
|
||||||
|
|
||||||
new_val = pGCPriv->clipOrg.x - x_off;
|
new_val = pGCPriv->clipOrg.x - x_off;
|
||||||
|
@ -393,30 +389,28 @@ static void XineramaInitData(ScreenPtr pScreen)
|
||||||
REGION_NULL(pScreen, &PanoramiXScreenRegion)
|
REGION_NULL(pScreen, &PanoramiXScreenRegion)
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
for (i = 0; i < PanoramiXNumScreens; i++) {
|
||||||
BoxRec TheBox;
|
BoxRec TheBox;
|
||||||
|
RegionRec ScreenRegion;
|
||||||
|
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
|
|
||||||
panoramiXdataPtr[i].x = dixScreenOrigins[i].x;
|
TheBox.x1 = pScreen->x;
|
||||||
panoramiXdataPtr[i].y = dixScreenOrigins[i].y;
|
TheBox.x2 = TheBox.x1 + pScreen->width;
|
||||||
panoramiXdataPtr[i].width = pScreen->width;
|
TheBox.y1 = pScreen->y;
|
||||||
panoramiXdataPtr[i].height = pScreen->height;
|
TheBox.y2 = TheBox.y1 + pScreen->height;
|
||||||
|
|
||||||
TheBox.x1 = panoramiXdataPtr[i].x;
|
REGION_INIT(pScreen, &ScreenRegion, &TheBox, 1);
|
||||||
TheBox.x2 = TheBox.x1 + panoramiXdataPtr[i].width;
|
|
||||||
TheBox.y1 = panoramiXdataPtr[i].y;
|
|
||||||
TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height;
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1);
|
|
||||||
REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion,
|
REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion,
|
||||||
&XineramaScreenRegions[i]);
|
&ScreenRegion);
|
||||||
|
REGION_UNINIT(pScreen, &ScreenRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
PanoramiXPixWidth = panoramiXdataPtr[0].x + panoramiXdataPtr[0].width;
|
PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
|
||||||
PanoramiXPixHeight = panoramiXdataPtr[0].y + panoramiXdataPtr[0].height;
|
PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
|
||||||
|
|
||||||
for (i = 1; i < PanoramiXNumScreens; i++) {
|
for (i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
w = panoramiXdataPtr[i].x + panoramiXdataPtr[i].width;
|
pScreen = screenInfo.screens[i];
|
||||||
h = panoramiXdataPtr[i].y + panoramiXdataPtr[i].height;
|
w = pScreen->x + pScreen->width;
|
||||||
|
h = pScreen->y + pScreen->height;
|
||||||
|
|
||||||
if (PanoramiXPixWidth < w)
|
if (PanoramiXPixWidth < w)
|
||||||
PanoramiXPixWidth = w;
|
PanoramiXPixWidth = w;
|
||||||
|
@ -427,12 +421,7 @@ static void XineramaInitData(ScreenPtr pScreen)
|
||||||
|
|
||||||
void XineramaReinitData(ScreenPtr pScreen)
|
void XineramaReinitData(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
|
REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++)
|
|
||||||
REGION_UNINIT(pScreen, &XineramaScreenRegions[i]);
|
|
||||||
|
|
||||||
XineramaInitData(pScreen);
|
XineramaInitData(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,12 +462,6 @@ void PanoramiXExtensionInit(int argc, char *argv[])
|
||||||
* run in non-PanoramiXeen mode.
|
* run in non-PanoramiXeen mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
panoramiXdataPtr = (PanoramiXData *)
|
|
||||||
calloc(PanoramiXNumScreens, sizeof(PanoramiXData));
|
|
||||||
|
|
||||||
if (!panoramiXdataPtr)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (!dixRequestPrivate(PanoramiXGCKey, sizeof(PanoramiXGCRec))) {
|
if (!dixRequestPrivate(PanoramiXGCKey, sizeof(PanoramiXGCRec))) {
|
||||||
noPanoramiXExtension = TRUE;
|
noPanoramiXExtension = TRUE;
|
||||||
return;
|
return;
|
||||||
|
@ -836,13 +819,14 @@ PanoramiXConsolidate(void)
|
||||||
saver->type = XRT_WINDOW;
|
saver->type = XRT_WINDOW;
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
for (i = 0; i < PanoramiXNumScreens; i++) {
|
||||||
root->info[i].id = WindowTable[i]->drawable.id;
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
|
root->info[i].id = pScreen->root->drawable.id;
|
||||||
root->u.win.class = InputOutput;
|
root->u.win.class = InputOutput;
|
||||||
root->u.win.root = TRUE;
|
root->u.win.root = TRUE;
|
||||||
saver->info[i].id = savedScreenInfo[i].wid;
|
saver->info[i].id = pScreen->screensaver.wid;
|
||||||
saver->u.win.class = InputOutput;
|
saver->u.win.class = InputOutput;
|
||||||
saver->u.win.root = TRUE;
|
saver->u.win.root = TRUE;
|
||||||
defmap->info[i].id = (screenInfo.screens[i])->defColormap;
|
defmap->info[i].id = pScreen->defColormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddResource(root->info[0].id, XRT_WINDOW, root);
|
AddResource(root->info[0].id, XRT_WINDOW, root);
|
||||||
|
@ -896,8 +880,6 @@ static void PanoramiXResetProc(ExtensionEntry* extEntry)
|
||||||
screenInfo.numScreens = PanoramiXNumScreens;
|
screenInfo.numScreens = PanoramiXNumScreens;
|
||||||
for (i = 256; i--; )
|
for (i = 256; i--; )
|
||||||
ProcVector[i] = SavedProcVector[i];
|
ProcVector[i] = SavedProcVector[i];
|
||||||
|
|
||||||
free(panoramiXdataPtr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -999,8 +981,8 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
/* screen dimensions */
|
/* screen dimensions */
|
||||||
rep.width = panoramiXdataPtr[stuff->screen].width;
|
rep.width = screenInfo.screens[stuff->screen]->width;
|
||||||
rep.height = panoramiXdataPtr[stuff->screen].height;
|
rep.height = screenInfo.screens[stuff->screen]->height;
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
rep.screen = stuff->screen;
|
rep.screen = stuff->screen;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
@ -1072,10 +1054,10 @@ ProcXineramaQueryScreens(ClientPtr client)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
for(i = 0; i < PanoramiXNumScreens; i++) {
|
||||||
scratch.x_org = panoramiXdataPtr[i].x;
|
scratch.x_org = screenInfo.screens[i]->x;
|
||||||
scratch.y_org = panoramiXdataPtr[i].y;
|
scratch.y_org = screenInfo.screens[i]->y;
|
||||||
scratch.width = panoramiXdataPtr[i].width;
|
scratch.width = screenInfo.screens[i]->width;
|
||||||
scratch.height = panoramiXdataPtr[i].height;
|
scratch.height = screenInfo.screens[i]->height;
|
||||||
|
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
int n;
|
int n;
|
||||||
|
@ -1153,7 +1135,7 @@ XineramaGetImageData(
|
||||||
int pitch,
|
int pitch,
|
||||||
Bool isRoot
|
Bool isRoot
|
||||||
){
|
){
|
||||||
RegionRec SrcRegion, GrabRegion;
|
RegionRec SrcRegion, ScreenRegion, GrabRegion;
|
||||||
BoxRec SrcBox, *pbox;
|
BoxRec SrcBox, *pbox;
|
||||||
int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth;
|
int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth;
|
||||||
DrawablePtr pDraw = pDrawables[0];
|
DrawablePtr pDraw = pDrawables[0];
|
||||||
|
@ -1165,8 +1147,8 @@ XineramaGetImageData(
|
||||||
SrcBox.x1 = left;
|
SrcBox.x1 = left;
|
||||||
SrcBox.y1 = top;
|
SrcBox.y1 = top;
|
||||||
if(!isRoot) {
|
if(!isRoot) {
|
||||||
SrcBox.x1 += pDraw->x + panoramiXdataPtr[0].x;
|
SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x;
|
||||||
SrcBox.y1 += pDraw->y + panoramiXdataPtr[0].y;
|
SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
SrcBox.x2 = SrcBox.x1 + width;
|
SrcBox.x2 = SrcBox.x1 + width;
|
||||||
SrcBox.y2 = SrcBox.y1 + height;
|
SrcBox.y2 = SrcBox.y1 + height;
|
||||||
|
@ -1177,22 +1159,31 @@ XineramaGetImageData(
|
||||||
depth = (format == XYPixmap) ? 1 : pDraw->depth;
|
depth = (format == XYPixmap) ? 1 : pDraw->depth;
|
||||||
|
|
||||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
for(i = 0; i < PanoramiXNumScreens; i++) {
|
||||||
|
BoxRec TheBox;
|
||||||
|
ScreenPtr pScreen;
|
||||||
pDraw = pDrawables[i];
|
pDraw = pDrawables[i];
|
||||||
|
pScreen = pDraw->pScreen;
|
||||||
|
|
||||||
inOut = RECT_IN_REGION(pScreen,&XineramaScreenRegions[i],&SrcBox);
|
TheBox.x1 = pScreen->x;
|
||||||
|
TheBox.x2 = TheBox.x1 + pScreen->width;
|
||||||
|
TheBox.y1 = pScreen->y;
|
||||||
|
TheBox.y2 = TheBox.y1 + pScreen->height;
|
||||||
|
|
||||||
|
REGION_INIT(pScreen, &ScreenRegion, &TheBox, 1);
|
||||||
|
inOut = RECT_IN_REGION(pScreen, &ScreenRegion, &SrcBox);
|
||||||
|
if(inOut == rgnPART)
|
||||||
|
REGION_INTERSECT(pScreen, &GrabRegion, &SrcRegion, &ScreenRegion);
|
||||||
|
REGION_UNINIT(pScreen, &ScreenRegion);
|
||||||
|
|
||||||
if(inOut == rgnIN) {
|
if(inOut == rgnIN) {
|
||||||
(*pDraw->pScreen->GetImage)(pDraw,
|
(*pScreen->GetImage)(pDraw,
|
||||||
SrcBox.x1 - pDraw->x - panoramiXdataPtr[i].x,
|
SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x,
|
||||||
SrcBox.y1 - pDraw->y - panoramiXdataPtr[i].y,
|
SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y,
|
||||||
width, height, format, planemask, data);
|
width, height, format, planemask, data);
|
||||||
break;
|
break;
|
||||||
} else if (inOut == rgnOUT)
|
} else if (inOut == rgnOUT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
REGION_INTERSECT(pScreen, &GrabRegion, &SrcRegion,
|
|
||||||
&XineramaScreenRegions[i]);
|
|
||||||
|
|
||||||
nbox = REGION_NUM_RECTS(&GrabRegion);
|
nbox = REGION_NUM_RECTS(&GrabRegion);
|
||||||
|
|
||||||
if(nbox) {
|
if(nbox) {
|
||||||
|
@ -1215,10 +1206,10 @@ XineramaGetImageData(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x = pbox->x1 - pDraw->x - panoramiXdataPtr[i].x;
|
x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x;
|
||||||
y = pbox->y1 - pDraw->y - panoramiXdataPtr[i].y;
|
y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y;
|
||||||
|
|
||||||
(*pDraw->pScreen->GetImage)(pDraw, x, y, w, h,
|
(*pScreen->GetImage)(pDraw, x, y, w, h,
|
||||||
format, planemask, ScratchMem);
|
format, planemask, ScratchMem);
|
||||||
|
|
||||||
/* copy the memory over */
|
/* copy the memory over */
|
||||||
|
|
|
@ -46,13 +46,6 @@ Equipment Corporation.
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct _PanoramiXData {
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
} PanoramiXData;
|
|
||||||
|
|
||||||
typedef struct _PanoramiXInfo {
|
typedef struct _PanoramiXInfo {
|
||||||
XID id ;
|
XID id ;
|
||||||
} PanoramiXInfo;
|
} PanoramiXInfo;
|
||||||
|
|
|
@ -129,14 +129,14 @@ int PanoramiXCreateWindow(ClientPtr client)
|
||||||
orig_visual = stuff->visual;
|
orig_visual = stuff->visual;
|
||||||
orig_x = stuff->x;
|
orig_x = stuff->x;
|
||||||
orig_y = stuff->y;
|
orig_y = stuff->y;
|
||||||
parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) ||
|
parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) ||
|
||||||
(stuff->parent == savedScreenInfo[0].wid);
|
(stuff->parent == screenInfo.screens[0]->screensaver.wid);
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->wid = newWin->info[j].id;
|
stuff->wid = newWin->info[j].id;
|
||||||
stuff->parent = parent->info[j].id;
|
stuff->parent = parent->info[j].id;
|
||||||
if (parentIsRoot) {
|
if (parentIsRoot) {
|
||||||
stuff->x = orig_x - panoramiXdataPtr[j].x;
|
stuff->x = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->y = orig_y - panoramiXdataPtr[j].y;
|
stuff->y = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
if (backPix)
|
if (backPix)
|
||||||
*((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id;
|
*((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id;
|
||||||
|
@ -328,14 +328,14 @@ int PanoramiXReparentWindow(ClientPtr client)
|
||||||
|
|
||||||
x = stuff->x;
|
x = stuff->x;
|
||||||
y = stuff->y;
|
y = stuff->y;
|
||||||
parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) ||
|
parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) ||
|
||||||
(stuff->parent == savedScreenInfo[0].wid);
|
(stuff->parent == screenInfo.screens[0]->screensaver.wid);
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->window = win->info[j].id;
|
stuff->window = win->info[j].id;
|
||||||
stuff->parent = parent->info[j].id;
|
stuff->parent = parent->info[j].id;
|
||||||
if(parentIsRoot) {
|
if(parentIsRoot) {
|
||||||
stuff->x = x - panoramiXdataPtr[j].x;
|
stuff->x = x - screenInfo.screens[j]->x;
|
||||||
stuff->y = y - panoramiXdataPtr[j].y;
|
stuff->y = y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*SavedProcVector[X_ReparentWindow])(client);
|
result = (*SavedProcVector[X_ReparentWindow])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -475,8 +475,8 @@ int PanoramiXConfigureWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pWin->parent && ((pWin->parent == WindowTable[0]) ||
|
if(pWin->parent && ((pWin->parent == screenInfo.screens[0]->root) ||
|
||||||
(pWin->parent->drawable.id == savedScreenInfo[0].wid)))
|
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)))
|
||||||
{
|
{
|
||||||
if ((Mask)stuff->mask & CWX) {
|
if ((Mask)stuff->mask & CWX) {
|
||||||
x_offset = 0;
|
x_offset = 0;
|
||||||
|
@ -495,9 +495,9 @@ int PanoramiXConfigureWindow(ClientPtr client)
|
||||||
if(sib)
|
if(sib)
|
||||||
*((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id;
|
*((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id;
|
||||||
if(x_offset >= 0)
|
if(x_offset >= 0)
|
||||||
*((CARD32 *) &stuff[1] + x_offset) = x - panoramiXdataPtr[j].x;
|
*((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.screens[j]->x;
|
||||||
if(y_offset >= 0)
|
if(y_offset >= 0)
|
||||||
*((CARD32 *) &stuff[1] + y_offset) = y - panoramiXdataPtr[j].y;
|
*((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.screens[j]->y;
|
||||||
result = (*SavedProcVector[X_ConfigureWindow])(client);
|
result = (*SavedProcVector[X_ConfigureWindow])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
}
|
}
|
||||||
|
@ -544,7 +544,7 @@ int PanoramiXGetGeometry(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.root = WindowTable[0]->drawable.id;
|
rep.root = screenInfo.screens[0]->root->drawable.id;
|
||||||
rep.depth = pDraw->depth;
|
rep.depth = pDraw->depth;
|
||||||
rep.width = pDraw->width;
|
rep.width = pDraw->width;
|
||||||
rep.height = pDraw->height;
|
rep.height = pDraw->height;
|
||||||
|
@ -562,11 +562,11 @@ int PanoramiXGetGeometry(ClientPtr client)
|
||||||
WindowPtr pWin = (WindowPtr)pDraw;
|
WindowPtr pWin = (WindowPtr)pDraw;
|
||||||
rep.x = pWin->origin.x - wBorderWidth (pWin);
|
rep.x = pWin->origin.x - wBorderWidth (pWin);
|
||||||
rep.y = pWin->origin.y - wBorderWidth (pWin);
|
rep.y = pWin->origin.y - wBorderWidth (pWin);
|
||||||
if((pWin->parent == WindowTable[0]) ||
|
if((pWin->parent == screenInfo.screens[0]->root) ||
|
||||||
(pWin->parent->drawable.id == savedScreenInfo[0].wid))
|
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
rep.x += panoramiXdataPtr[0].x;
|
rep.x += screenInfo.screens[0]->x;
|
||||||
rep.y += panoramiXdataPtr[0].y;
|
rep.y += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
rep.borderWidth = pWin->borderWidth;
|
rep.borderWidth = pWin->borderWidth;
|
||||||
}
|
}
|
||||||
|
@ -596,11 +596,11 @@ int PanoramiXTranslateCoords(ClientPtr client)
|
||||||
rep.sameScreen = xTrue;
|
rep.sameScreen = xTrue;
|
||||||
rep.child = None;
|
rep.child = None;
|
||||||
|
|
||||||
if((pWin == WindowTable[0]) ||
|
if((pWin == screenInfo.screens[0]->root) ||
|
||||||
(pWin->drawable.id == savedScreenInfo[0].wid))
|
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
x = stuff->srcX - panoramiXdataPtr[0].x;
|
x = stuff->srcX - screenInfo.screens[0]->x;
|
||||||
y = stuff->srcY - panoramiXdataPtr[0].y;
|
y = stuff->srcY - screenInfo.screens[0]->y;
|
||||||
} else {
|
} else {
|
||||||
x = pWin->drawable.x + stuff->srcX;
|
x = pWin->drawable.x + stuff->srcX;
|
||||||
y = pWin->drawable.y + stuff->srcY;
|
y = pWin->drawable.y + stuff->srcY;
|
||||||
|
@ -634,11 +634,11 @@ int PanoramiXTranslateCoords(ClientPtr client)
|
||||||
}
|
}
|
||||||
rep.dstX = x - pDst->drawable.x;
|
rep.dstX = x - pDst->drawable.x;
|
||||||
rep.dstY = y - pDst->drawable.y;
|
rep.dstY = y - pDst->drawable.y;
|
||||||
if((pDst == WindowTable[0]) ||
|
if((pDst == screenInfo.screens[0]->root) ||
|
||||||
(pDst->drawable.id == savedScreenInfo[0].wid))
|
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
rep.dstX += panoramiXdataPtr[0].x;
|
rep.dstX += screenInfo.screens[0]->x;
|
||||||
rep.dstY += panoramiXdataPtr[0].y;
|
rep.dstY += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
|
WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
|
||||||
|
@ -981,8 +981,8 @@ int PanoramiXClearToBackground(ClientPtr client)
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->window = win->info[j].id;
|
stuff->window = win->info[j].id;
|
||||||
if(isRoot) {
|
if(isRoot) {
|
||||||
stuff->x = x - panoramiXdataPtr[j].x;
|
stuff->x = x - screenInfo.screens[j]->x;
|
||||||
stuff->y = y - panoramiXdataPtr[j].y;
|
stuff->y = y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*SavedProcVector[X_ClearArea])(client);
|
result = (*SavedProcVector[X_ClearArea])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -1084,20 +1084,22 @@ int PanoramiXCopyArea(ClientPtr client)
|
||||||
} else {
|
} else {
|
||||||
DrawablePtr pDst = NULL, pSrc = NULL;
|
DrawablePtr pDst = NULL, pSrc = NULL;
|
||||||
GCPtr pGC = NULL;
|
GCPtr pGC = NULL;
|
||||||
RegionPtr pRgn[MAXSCREENS];
|
RegionRec totalReg;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
REGION_NULL(unusedScreen, &totalReg);
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
|
RegionPtr pRgn;
|
||||||
stuff->dstDrawable = dst->info[j].id;
|
stuff->dstDrawable = dst->info[j].id;
|
||||||
stuff->srcDrawable = src->info[j].id;
|
stuff->srcDrawable = src->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (srcIsRoot) {
|
if (srcIsRoot) {
|
||||||
stuff->srcX = srcx - panoramiXdataPtr[j].x;
|
stuff->srcX = srcx - screenInfo.screens[j]->x;
|
||||||
stuff->srcY = srcy - panoramiXdataPtr[j].y;
|
stuff->srcY = srcy - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
if (dstIsRoot) {
|
if (dstIsRoot) {
|
||||||
stuff->dstX = dstx - panoramiXdataPtr[j].x;
|
stuff->dstX = dstx - screenInfo.screens[j]->x;
|
||||||
stuff->dstY = dsty - panoramiXdataPtr[j].y;
|
stuff->dstY = dsty - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
|
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
|
||||||
|
@ -1116,37 +1118,30 @@ int PanoramiXCopyArea(ClientPtr client)
|
||||||
} else
|
} else
|
||||||
pSrc = pDst;
|
pSrc = pDst;
|
||||||
|
|
||||||
pRgn[j] = (*pGC->ops->CopyArea)(pSrc, pDst, pGC,
|
pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC,
|
||||||
stuff->srcX, stuff->srcY,
|
stuff->srcX, stuff->srcY,
|
||||||
stuff->width, stuff->height,
|
stuff->width, stuff->height,
|
||||||
stuff->dstX, stuff->dstY);
|
stuff->dstX, stuff->dstY);
|
||||||
|
if(pGC->graphicsExposures && pRgn) {
|
||||||
if(dstShared) {
|
if(srcIsRoot) {
|
||||||
while(j--) pRgn[j] = NULL;
|
REGION_TRANSLATE(unusedScreen, pRgn,
|
||||||
break;
|
screenInfo.screens[j]->x, screenInfo.screens[j]->y);
|
||||||
|
}
|
||||||
|
REGION_APPEND(unusedScreen, &totalReg, pRgn);
|
||||||
|
REGION_DESTROY(unusedScreen, pRgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(dstShared)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pGC->graphicsExposures) {
|
if(pGC->graphicsExposures) {
|
||||||
ScreenPtr pScreen = pDst->pScreen;
|
ScreenPtr pScreen = pDst->pScreen;
|
||||||
RegionRec totalReg;
|
|
||||||
Bool overlap;
|
Bool overlap;
|
||||||
|
REGION_VALIDATE(unusedScreen, &totalReg, &overlap);
|
||||||
REGION_NULL(pScreen, &totalReg);
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
|
||||||
if(pRgn[j]) {
|
|
||||||
if(srcIsRoot) {
|
|
||||||
REGION_TRANSLATE(pScreen, pRgn[j],
|
|
||||||
panoramiXdataPtr[j].x, panoramiXdataPtr[j].y);
|
|
||||||
}
|
|
||||||
REGION_APPEND(pScreen, &totalReg, pRgn[j]);
|
|
||||||
REGION_DESTROY(pScreen, pRgn[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
REGION_VALIDATE(pScreen, &totalReg, &overlap);
|
|
||||||
(*pScreen->SendGraphicsExpose)(
|
(*pScreen->SendGraphicsExpose)(
|
||||||
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
|
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
|
||||||
REGION_UNINIT(pScreen, &totalReg);
|
REGION_UNINIT(unusedScreen, &totalReg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1163,7 +1158,7 @@ int PanoramiXCopyPlane(ClientPtr client)
|
||||||
Bool srcShared, dstShared;
|
Bool srcShared, dstShared;
|
||||||
DrawablePtr psrcDraw, pdstDraw = NULL;
|
DrawablePtr psrcDraw, pdstDraw = NULL;
|
||||||
GCPtr pGC = NULL;
|
GCPtr pGC = NULL;
|
||||||
RegionPtr pRgn[MAXSCREENS];
|
RegionRec totalReg;
|
||||||
REQUEST(xCopyPlaneReq);
|
REQUEST(xCopyPlaneReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCopyPlaneReq);
|
REQUEST_SIZE_MATCH(xCopyPlaneReq);
|
||||||
|
@ -1198,17 +1193,19 @@ int PanoramiXCopyPlane(ClientPtr client)
|
||||||
srcx = stuff->srcX; srcy = stuff->srcY;
|
srcx = stuff->srcX; srcy = stuff->srcY;
|
||||||
dstx = stuff->dstX; dsty = stuff->dstY;
|
dstx = stuff->dstX; dsty = stuff->dstY;
|
||||||
|
|
||||||
|
REGION_NULL(unusedScreen, &totalReg);
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
|
RegionPtr pRgn;
|
||||||
stuff->dstDrawable = dst->info[j].id;
|
stuff->dstDrawable = dst->info[j].id;
|
||||||
stuff->srcDrawable = src->info[j].id;
|
stuff->srcDrawable = src->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (srcIsRoot) {
|
if (srcIsRoot) {
|
||||||
stuff->srcX = srcx - panoramiXdataPtr[j].x;
|
stuff->srcX = srcx - screenInfo.screens[j]->x;
|
||||||
stuff->srcY = srcy - panoramiXdataPtr[j].y;
|
stuff->srcY = srcy - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
if (dstIsRoot) {
|
if (dstIsRoot) {
|
||||||
stuff->dstX = dstx - panoramiXdataPtr[j].x;
|
stuff->dstX = dstx - screenInfo.screens[j]->x;
|
||||||
stuff->dstY = dsty - panoramiXdataPtr[j].y;
|
stuff->dstY = dsty - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess);
|
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess);
|
||||||
|
@ -1231,33 +1228,26 @@ int PanoramiXCopyPlane(ClientPtr client)
|
||||||
return(BadValue);
|
return(BadValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
pRgn[j] = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC,
|
pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC,
|
||||||
stuff->srcX, stuff->srcY,
|
stuff->srcX, stuff->srcY,
|
||||||
stuff->width, stuff->height,
|
stuff->width, stuff->height,
|
||||||
stuff->dstX, stuff->dstY, stuff->bitPlane);
|
stuff->dstX, stuff->dstY, stuff->bitPlane);
|
||||||
|
if(pGC->graphicsExposures && pRgn) {
|
||||||
if(dstShared) {
|
REGION_APPEND(unusedScreen, &totalReg, pRgn);
|
||||||
while(j--) pRgn[j] = NULL;
|
REGION_DESTROY(unusedScreen, pRgn);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(dstShared)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pGC->graphicsExposures) {
|
if(pGC->graphicsExposures) {
|
||||||
ScreenPtr pScreen = pdstDraw->pScreen;
|
ScreenPtr pScreen = pdstDraw->pScreen;
|
||||||
RegionRec totalReg;
|
|
||||||
Bool overlap;
|
Bool overlap;
|
||||||
|
REGION_VALIDATE(unusedScreen, &totalReg, &overlap);
|
||||||
REGION_NULL(pScreen, &totalReg);
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
|
||||||
if(pRgn[j]) {
|
|
||||||
REGION_APPEND(pScreen, &totalReg, pRgn[j]);
|
|
||||||
REGION_DESTROY(pScreen, pRgn[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
REGION_VALIDATE(pScreen, &totalReg, &overlap);
|
|
||||||
(*pScreen->SendGraphicsExpose)(
|
(*pScreen->SendGraphicsExpose)(
|
||||||
client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0);
|
client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0);
|
||||||
REGION_UNINIT(pScreen, &totalReg);
|
REGION_UNINIT(unusedScreen, &totalReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -1297,8 +1287,8 @@ int PanoramiXPolyPoint(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
|
if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xPoint *pnts = (xPoint*)&stuff[1];
|
xPoint *pnts = (xPoint*)&stuff[1];
|
||||||
|
@ -1357,8 +1347,8 @@ int PanoramiXPolyLine(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
|
if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xPoint *pnts = (xPoint*)&stuff[1];
|
xPoint *pnts = (xPoint*)&stuff[1];
|
||||||
|
@ -1420,8 +1410,8 @@ int PanoramiXPolySegment(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment));
|
if(j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xSegment *segs = (xSegment*)&stuff[1];
|
xSegment *segs = (xSegment*)&stuff[1];
|
||||||
|
@ -1483,8 +1473,8 @@ int PanoramiXPolyRectangle(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle));
|
if(j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
|
@ -1545,8 +1535,8 @@ int PanoramiXPolyArc(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc));
|
if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xArc *arcs = (xArc *) &stuff[1];
|
xArc *arcs = (xArc *) &stuff[1];
|
||||||
|
@ -1603,8 +1593,8 @@ int PanoramiXFillPoly(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec));
|
if(j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
DDXPointPtr pnts = (DDXPointPtr)&stuff[1];
|
DDXPointPtr pnts = (DDXPointPtr)&stuff[1];
|
||||||
|
@ -1666,8 +1656,8 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle));
|
if(j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xRectangle *rects = (xRectangle *) &stuff[1];
|
xRectangle *rects = (xRectangle *) &stuff[1];
|
||||||
|
@ -1727,8 +1717,8 @@ int PanoramiXPolyFillArc(ClientPtr client)
|
||||||
if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc));
|
if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc));
|
||||||
|
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xArc *arcs = (xArc *) &stuff[1];
|
xArc *arcs = (xArc *) &stuff[1];
|
||||||
|
@ -1780,8 +1770,8 @@ int PanoramiXPutImage(ClientPtr client)
|
||||||
orig_y = stuff->dstY;
|
orig_y = stuff->dstY;
|
||||||
FOR_NSCREENS_BACKWARD(j){
|
FOR_NSCREENS_BACKWARD(j){
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
stuff->dstX = orig_x - panoramiXdataPtr[j].x;
|
stuff->dstX = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->dstY = orig_y - panoramiXdataPtr[j].y;
|
stuff->dstY = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
stuff->drawable = draw->info[j].id;
|
stuff->drawable = draw->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
|
@ -1846,10 +1836,10 @@ int PanoramiXGetImage(ClientPtr client)
|
||||||
return(BadMatch);
|
return(BadMatch);
|
||||||
} else {
|
} else {
|
||||||
if( /* check for being onscreen */
|
if( /* check for being onscreen */
|
||||||
panoramiXdataPtr[0].x + pDraw->x + x < 0 ||
|
screenInfo.screens[0]->x + pDraw->x + x < 0 ||
|
||||||
panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth ||
|
screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
|
||||||
panoramiXdataPtr[0].y + pDraw->y + y < 0 ||
|
screenInfo.screens[0]->y + pDraw->y + y < 0 ||
|
||||||
panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight ||
|
screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
|
||||||
/* check for being inside of border */
|
/* check for being inside of border */
|
||||||
x < - wBorderWidth((WindowPtr)pDraw) ||
|
x < - wBorderWidth((WindowPtr)pDraw) ||
|
||||||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
|
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
|
||||||
|
@ -1983,8 +1973,8 @@ PanoramiXPolyText8(ClientPtr client)
|
||||||
stuff->drawable = draw->info[j].id;
|
stuff->drawable = draw->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
stuff->x = orig_x - panoramiXdataPtr[j].x;
|
stuff->x = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->y = orig_y - panoramiXdataPtr[j].y;
|
stuff->y = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*SavedProcVector[X_PolyText8])(client);
|
result = (*SavedProcVector[X_PolyText8])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -2024,8 +2014,8 @@ PanoramiXPolyText16(ClientPtr client)
|
||||||
stuff->drawable = draw->info[j].id;
|
stuff->drawable = draw->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
stuff->x = orig_x - panoramiXdataPtr[j].x;
|
stuff->x = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->y = orig_y - panoramiXdataPtr[j].y;
|
stuff->y = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*SavedProcVector[X_PolyText16])(client);
|
result = (*SavedProcVector[X_PolyText16])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -2065,8 +2055,8 @@ int PanoramiXImageText8(ClientPtr client)
|
||||||
stuff->drawable = draw->info[j].id;
|
stuff->drawable = draw->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
stuff->x = orig_x - panoramiXdataPtr[j].x;
|
stuff->x = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->y = orig_y - panoramiXdataPtr[j].y;
|
stuff->y = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*SavedProcVector[X_ImageText8])(client);
|
result = (*SavedProcVector[X_ImageText8])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -2106,8 +2096,8 @@ int PanoramiXImageText16(ClientPtr client)
|
||||||
stuff->drawable = draw->info[j].id;
|
stuff->drawable = draw->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
stuff->x = orig_x - panoramiXdataPtr[j].x;
|
stuff->x = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->y = orig_y - panoramiXdataPtr[j].y;
|
stuff->y = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*SavedProcVector[X_ImageText16])(client);
|
result = (*SavedProcVector[X_ImageText16])(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
|
|
||||||
extern _X_EXPORT int PanoramiXNumScreens;
|
extern _X_EXPORT int PanoramiXNumScreens;
|
||||||
extern _X_EXPORT PanoramiXData *panoramiXdataPtr;
|
|
||||||
extern _X_EXPORT int PanoramiXPixWidth;
|
extern _X_EXPORT int PanoramiXPixWidth;
|
||||||
extern _X_EXPORT int PanoramiXPixHeight;
|
extern _X_EXPORT int PanoramiXPixHeight;
|
||||||
|
|
||||||
|
@ -22,8 +21,6 @@ extern _X_EXPORT int XineramaDeleteResource(pointer, XID);
|
||||||
|
|
||||||
extern _X_EXPORT void XineramaReinitData(ScreenPtr);
|
extern _X_EXPORT void XineramaReinitData(ScreenPtr);
|
||||||
|
|
||||||
extern _X_EXPORT RegionRec XineramaScreenRegions[MAXSCREENS];
|
|
||||||
|
|
||||||
extern _X_EXPORT unsigned long XRC_DRAWABLE;
|
extern _X_EXPORT unsigned long XRC_DRAWABLE;
|
||||||
extern _X_EXPORT unsigned long XRT_WINDOW;
|
extern _X_EXPORT unsigned long XRT_WINDOW;
|
||||||
extern _X_EXPORT unsigned long XRT_PIXMAP;
|
extern _X_EXPORT unsigned long XRT_PIXMAP;
|
||||||
|
|
18
Xext/saver.c
18
Xext/saver.c
|
@ -285,7 +285,7 @@ CheckScreenPrivate (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
free(pPriv);
|
free(pPriv);
|
||||||
SetScreenPrivate (pScreen, NULL);
|
SetScreenPrivate (pScreen, NULL);
|
||||||
savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL;
|
pScreen->screensaver.ExternalScreenSaver = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ MakeScreenPrivate (ScreenPtr pScreen)
|
||||||
pPriv->hasWindow = FALSE;
|
pPriv->hasWindow = FALSE;
|
||||||
pPriv->installedMap = None;
|
pPriv->installedMap = None;
|
||||||
SetScreenPrivate (pScreen, pPriv);
|
SetScreenPrivate (pScreen, pPriv);
|
||||||
savedScreenInfo[pScreen->myNum].ExternalScreenSaver = ScreenSaverHandle;
|
pScreen->screensaver.ExternalScreenSaver = ScreenSaverHandle;
|
||||||
return pPriv;
|
return pPriv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,8 +503,8 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
|
||||||
ev.type = ScreenSaverNotify + ScreenSaverEventBase;
|
ev.type = ScreenSaverNotify + ScreenSaverEventBase;
|
||||||
ev.state = state;
|
ev.state = state;
|
||||||
ev.timestamp = currentTime.milliseconds;
|
ev.timestamp = currentTime.milliseconds;
|
||||||
ev.root = WindowTable[pScreen->myNum]->drawable.id;
|
ev.root = pScreen->root->drawable.id;
|
||||||
ev.window = savedScreenInfo[pScreen->myNum].wid;
|
ev.window = pScreen->screensaver.wid;
|
||||||
ev.kind = kind;
|
ev.kind = kind;
|
||||||
ev.forced = forced;
|
ev.forced = forced;
|
||||||
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
|
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
|
||||||
|
@ -559,7 +559,7 @@ CreateSaverWindow (ScreenPtr pScreen)
|
||||||
Colormap wantMap;
|
Colormap wantMap;
|
||||||
ColormapPtr pCmap;
|
ColormapPtr pCmap;
|
||||||
|
|
||||||
pSaver = &savedScreenInfo[pScreen->myNum];
|
pSaver = &pScreen->screensaver;
|
||||||
if (pSaver->pWindow)
|
if (pSaver->pWindow)
|
||||||
{
|
{
|
||||||
pSaver->pWindow = NullWindow;
|
pSaver->pWindow = NullWindow;
|
||||||
|
@ -580,7 +580,7 @@ CreateSaverWindow (ScreenPtr pScreen)
|
||||||
if (GrabInProgress && GrabInProgress != pAttr->client->index)
|
if (GrabInProgress && GrabInProgress != pAttr->client->index)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pWin = CreateWindow (pSaver->wid, WindowTable[pScreen->myNum],
|
pWin = CreateWindow (pSaver->wid, pScreen->root,
|
||||||
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
|
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
|
||||||
pAttr->borderWidth, pAttr->class,
|
pAttr->borderWidth, pAttr->class,
|
||||||
pAttr->mask, (XID *)pAttr->values,
|
pAttr->mask, (XID *)pAttr->values,
|
||||||
|
@ -672,7 +672,7 @@ DestroySaverWindow (ScreenPtr pScreen)
|
||||||
if (!pPriv || !pPriv->hasWindow)
|
if (!pPriv || !pPriv->hasWindow)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pSaver = &savedScreenInfo[pScreen->myNum];
|
pSaver = &pScreen->screensaver;
|
||||||
if (pSaver->pWindow)
|
if (pSaver->pWindow)
|
||||||
{
|
{
|
||||||
pSaver->pWindow = NullWindow;
|
pSaver->pWindow = NullWindow;
|
||||||
|
@ -756,7 +756,7 @@ ProcScreenSaverQueryInfo (ClientPtr client)
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
pSaver = &savedScreenInfo[pDraw->pScreen->myNum];
|
pSaver = &pDraw->pScreen->screensaver;
|
||||||
pPriv = GetScreenPrivate (pDraw->pScreen);
|
pPriv = GetScreenPrivate (pDraw->pScreen);
|
||||||
|
|
||||||
UpdateCurrentTime ();
|
UpdateCurrentTime ();
|
||||||
|
@ -866,7 +866,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
return ret;
|
return ret;
|
||||||
pScreen = pDraw->pScreen;
|
pScreen = pDraw->pScreen;
|
||||||
pParent = WindowTable[pScreen->myNum];
|
pParent = pScreen->root;
|
||||||
|
|
||||||
ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess);
|
ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess);
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
|
|
12
Xext/shm.c
12
Xext/shm.c
|
@ -598,8 +598,8 @@ ProcPanoramiXShmPutImage(ClientPtr client)
|
||||||
stuff->drawable = draw->info[j].id;
|
stuff->drawable = draw->info[j].id;
|
||||||
stuff->gc = gc->info[j].id;
|
stuff->gc = gc->info[j].id;
|
||||||
if (isRoot) {
|
if (isRoot) {
|
||||||
stuff->dstX = orig_x - panoramiXdataPtr[j].x;
|
stuff->dstX = orig_x - screenInfo.screens[j]->x;
|
||||||
stuff->dstY = orig_y - panoramiXdataPtr[j].y;
|
stuff->dstY = orig_y - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = ProcShmPutImage(client);
|
result = ProcShmPutImage(client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -660,10 +660,10 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
return(BadMatch);
|
return(BadMatch);
|
||||||
} else {
|
} else {
|
||||||
if( /* check for being onscreen */
|
if( /* check for being onscreen */
|
||||||
panoramiXdataPtr[0].x + pDraw->x + x < 0 ||
|
screenInfo.screens[0]->x + pDraw->x + x < 0 ||
|
||||||
panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth ||
|
screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
|
||||||
panoramiXdataPtr[0].y + pDraw->y + y < 0 ||
|
screenInfo.screens[0]->y + pDraw->y + y < 0 ||
|
||||||
panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight ||
|
screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
|
||||||
/* check for being inside of border */
|
/* check for being inside of border */
|
||||||
x < - wBorderWidth((WindowPtr)pDraw) ||
|
x < - wBorderWidth((WindowPtr)pDraw) ||
|
||||||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
|
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
|
||||||
|
|
|
@ -1690,8 +1690,8 @@ XineramaXvShmPutImage(ClientPtr client)
|
||||||
stuff->drw_x = x;
|
stuff->drw_x = x;
|
||||||
stuff->drw_y = y;
|
stuff->drw_y = y;
|
||||||
if(isRoot) {
|
if(isRoot) {
|
||||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
stuff->drw_x -= screenInfo.screens[i]->x;
|
||||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
stuff->send_event = (send_event && !i) ? 1 : 0;
|
stuff->send_event = (send_event && !i) ? 1 : 0;
|
||||||
|
|
||||||
|
@ -1742,8 +1742,8 @@ XineramaXvPutImage(ClientPtr client)
|
||||||
stuff->drw_x = x;
|
stuff->drw_x = x;
|
||||||
stuff->drw_y = y;
|
stuff->drw_y = y;
|
||||||
if(isRoot) {
|
if(isRoot) {
|
||||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
stuff->drw_x -= screenInfo.screens[i]->x;
|
||||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ProcXvPutImage(client);
|
result = ProcXvPutImage(client);
|
||||||
|
@ -1790,8 +1790,8 @@ XineramaXvPutVideo(ClientPtr client)
|
||||||
stuff->drw_x = x;
|
stuff->drw_x = x;
|
||||||
stuff->drw_y = y;
|
stuff->drw_y = y;
|
||||||
if(isRoot) {
|
if(isRoot) {
|
||||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
stuff->drw_x -= screenInfo.screens[i]->x;
|
||||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ProcXvPutVideo(client);
|
result = ProcXvPutVideo(client);
|
||||||
|
@ -1838,8 +1838,8 @@ XineramaXvPutStill(ClientPtr client)
|
||||||
stuff->drw_x = x;
|
stuff->drw_x = x;
|
||||||
stuff->drw_y = y;
|
stuff->drw_y = y;
|
||||||
if(isRoot) {
|
if(isRoot) {
|
||||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
stuff->drw_x -= screenInfo.screens[i]->x;
|
||||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
stuff->drw_y -= screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = ProcXvPutStill(client);
|
result = ProcXvPutStill(client);
|
||||||
|
|
|
@ -156,7 +156,7 @@ ProcXCloseDevice(ClientPtr client)
|
||||||
* Delete passive grabs from all windows for this device. */
|
* Delete passive grabs from all windows for this device. */
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
DeleteDeviceEvents(d, pWin, client);
|
DeleteDeviceEvents(d, pWin, client);
|
||||||
p1 = pWin->firstChild;
|
p1 = pWin->firstChild;
|
||||||
DeleteEventsFromChildren(d, p1, client);
|
DeleteEventsFromChildren(d, p1, client);
|
||||||
|
|
|
@ -926,7 +926,7 @@ ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
DeliverEventsToWindow(device, WindowTable[i], xi, 1,
|
DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
|
||||||
GetEventFilter(device, xi), NULL);
|
GetEventFilter(device, xi), NULL);
|
||||||
free(xi);
|
free(xi);
|
||||||
}
|
}
|
||||||
|
@ -1042,7 +1042,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
|
|
||||||
/* see comment in EnqueueEvents regarding the next three lines */
|
/* see comment in EnqueueEvents regarding the next three lines */
|
||||||
if (ev->any.type == ET_Motion)
|
if (ev->any.type == ET_Motion)
|
||||||
ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
|
ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
|
||||||
|
|
||||||
eventinfo.device = device;
|
eventinfo.device = device;
|
||||||
eventinfo.event = ev;
|
eventinfo.event = ev;
|
||||||
|
@ -2120,7 +2120,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
|
||||||
WindowPtr pWin, p1;
|
WindowPtr pWin, p1;
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
if (!pWin)
|
if (!pWin)
|
||||||
continue;
|
continue;
|
||||||
DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);
|
DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);
|
||||||
|
|
|
@ -93,7 +93,7 @@ int ProcXIChangeCursor(ClientPtr client)
|
||||||
|
|
||||||
if (stuff->cursor == None)
|
if (stuff->cursor == None)
|
||||||
{
|
{
|
||||||
if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
|
if (pWin == pWin->drawable.pScreen->root)
|
||||||
pCursor = rootCursor;
|
pCursor = rootCursor;
|
||||||
else
|
else
|
||||||
pCursor = (CursorPtr)None;
|
pCursor = (CursorPtr)None;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "eventconvert.h"
|
#include "eventconvert.h"
|
||||||
|
#include "scrnintstr.h"
|
||||||
#include "xkbsrv.h"
|
#include "xkbsrv.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
|
@ -181,12 +182,12 @@ ProcXIQueryPointer(ClientPtr client)
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension) {
|
if(!noPanoramiXExtension) {
|
||||||
rep.root_x += FP1616(panoramiXdataPtr[0].x, 0);
|
rep.root_x += FP1616(screenInfo.screens[0]->x, 0);
|
||||||
rep.root_y += FP1616(panoramiXdataPtr[0].y, 0);
|
rep.root_y += FP1616(screenInfo.screens[0]->y, 0);
|
||||||
if (stuff->win == rep.root)
|
if (stuff->win == rep.root)
|
||||||
{
|
{
|
||||||
rep.win_x += FP1616(panoramiXdataPtr[0].x, 0);
|
rep.win_x += FP1616(screenInfo.screens[0]->x, 0);
|
||||||
rep.win_y += FP1616(panoramiXdataPtr[0].y, 0);
|
rep.win_y += FP1616(screenInfo.screens[0]->y, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -141,7 +141,7 @@ compScreenUpdate (ScreenPtr pScreen)
|
||||||
compCheckTree (pScreen);
|
compCheckTree (pScreen);
|
||||||
if (cs->damaged)
|
if (cs->damaged)
|
||||||
{
|
{
|
||||||
compWindowUpdate (WindowTable[pScreen->myNum]);
|
compWindowUpdate (pScreen->root);
|
||||||
cs->damaged = FALSE;
|
cs->damaged = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ Bool
|
||||||
compCreateOverlayWindow (ScreenPtr pScreen)
|
compCreateOverlayWindow (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
CompScreenPtr cs = GetCompScreen(pScreen);
|
CompScreenPtr cs = GetCompScreen(pScreen);
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */
|
XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */
|
||||||
int result;
|
int result;
|
||||||
|
|
|
@ -800,7 +800,7 @@ CompositeRealChildHead (WindowPtr pWin)
|
||||||
|
|
||||||
if (!pWin->parent &&
|
if (!pWin->parent &&
|
||||||
(screenIsSaved == SCREEN_SAVER_ON) &&
|
(screenIsSaved == SCREEN_SAVER_ON) &&
|
||||||
(HasSaverWindow (pWin->drawable.pScreen->myNum))) {
|
(HasSaverWindow (pWin->drawable.pScreen))) {
|
||||||
|
|
||||||
/* First child is the screen saver; see if next child is the overlay */
|
/* First child is the screen saver; see if next child is the overlay */
|
||||||
pChildBefore = pWin->firstChild;
|
pChildBefore = pWin->firstChild;
|
||||||
|
|
|
@ -360,9 +360,9 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||||
/* Sprites appear on first root window, so we can hardcode it */
|
/* Sprites appear on first root window, so we can hardcode it */
|
||||||
if (dev->spriteInfo->spriteOwner)
|
if (dev->spriteInfo->spriteOwner)
|
||||||
{
|
{
|
||||||
InitializeSprite(dev, WindowTable[0]);
|
InitializeSprite(dev, screenInfo.screens[0]->root);
|
||||||
/* mode doesn't matter */
|
/* mode doesn't matter */
|
||||||
EnterWindow(dev, WindowTable[0], NotifyAncestor);
|
EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
|
||||||
}
|
}
|
||||||
else if ((other = NextFreePointerDevice()) == NULL)
|
else if ((other = NextFreePointerDevice()) == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2435,7 +2435,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
if (dev->spriteInfo->sprite)
|
if (dev->spriteInfo->sprite)
|
||||||
currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
|
currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
|
||||||
else /* new device auto-set to floating */
|
else /* new device auto-set to floating */
|
||||||
currentRoot = WindowTable[0];
|
currentRoot = screenInfo.screens[0]->root;
|
||||||
|
|
||||||
/* we need to init a fake sprite */
|
/* we need to init a fake sprite */
|
||||||
screen = currentRoot->drawable.pScreen;
|
screen = currentRoot->drawable.pScreen;
|
||||||
|
|
|
@ -562,7 +562,7 @@ CreateConnectionBlock(void)
|
||||||
VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
|
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
root.windowId = WindowTable[i]->drawable.id;
|
root.windowId = pScreen->root->drawable.id;
|
||||||
root.defaultColormap = pScreen->defColormap;
|
root.defaultColormap = pScreen->defColormap;
|
||||||
root.whitePixel = pScreen->whitePixel;
|
root.whitePixel = pScreen->whitePixel;
|
||||||
root.blackPixel = pScreen->blackPixel;
|
root.blackPixel = pScreen->blackPixel;
|
||||||
|
@ -912,7 +912,7 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||||
rep->type = X_Reply;
|
rep->type = X_Reply;
|
||||||
rep->length = 0;
|
rep->length = 0;
|
||||||
rep->sequenceNumber = client->sequence;
|
rep->sequenceNumber = client->sequence;
|
||||||
rep->root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
|
rep->root = pDraw->pScreen->root->drawable.id;
|
||||||
rep->depth = pDraw->depth;
|
rep->depth = pDraw->depth;
|
||||||
rep->width = pDraw->width;
|
rep->width = pDraw->width;
|
||||||
rep->height = pDraw->height;
|
rep->height = pDraw->height;
|
||||||
|
@ -972,7 +972,7 @@ ProcQueryTree(ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
memset(&reply, 0, sizeof(xQueryTreeReply));
|
memset(&reply, 0, sizeof(xQueryTreeReply));
|
||||||
reply.type = X_Reply;
|
reply.type = X_Reply;
|
||||||
reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
|
reply.root = pWin->drawable.pScreen->root->drawable.id;
|
||||||
reply.sequenceNumber = client->sequence;
|
reply.sequenceNumber = client->sequence;
|
||||||
if (pWin->parent)
|
if (pWin->parent)
|
||||||
reply.parent = pWin->parent->drawable.id;
|
reply.parent = pWin->parent->drawable.id;
|
||||||
|
@ -2055,7 +2055,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pBoundingDraw = (DrawablePtr)WindowTable[pDraw->pScreen->myNum];
|
pBoundingDraw = (DrawablePtr)pDraw->pScreen->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
xgi.visual = wVisual (pWin);
|
xgi.visual = wVisual (pWin);
|
||||||
|
@ -3666,9 +3666,9 @@ SendConnSetup(ClientPtr client, char *reason)
|
||||||
{
|
{
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
xDepth *pDepth;
|
xDepth *pDepth;
|
||||||
|
WindowPtr pRoot = screenInfo.screens[i]->root;
|
||||||
|
|
||||||
root->currentInputMask = WindowTable[i]->eventMask |
|
root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot);
|
||||||
wOtherEventMasks (WindowTable[i]);
|
|
||||||
pDepth = (xDepth *)(root + 1);
|
pDepth = (xDepth *)(root + 1);
|
||||||
for (j = 0; j < root->nDepths; j++)
|
for (j = 0; j < root->nDepths; j++)
|
||||||
{
|
{
|
||||||
|
@ -3916,7 +3916,6 @@ AddScreen(
|
||||||
any of the strings pointed to by argv. They may be passed to
|
any of the strings pointed to by argv. They may be passed to
|
||||||
multiple screens.
|
multiple screens.
|
||||||
*/
|
*/
|
||||||
WindowTable[i] = NullWindow;
|
|
||||||
screenInfo.screens[i] = pScreen;
|
screenInfo.screens[i] = pScreen;
|
||||||
screenInfo.numScreens++;
|
screenInfo.numScreens++;
|
||||||
if (!(*pfnInit)(i, pScreen, argc, argv))
|
if (!(*pfnInit)(i, pScreen, argc, argv))
|
||||||
|
|
|
@ -1077,7 +1077,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
|
||||||
|
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = WindowTable[i];
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
|
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
||||||
|
@ -1138,7 +1138,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev,
|
||||||
|
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = WindowTable[i];
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasFocus(root) && !FirstFocusChild(root))
|
if (!HasFocus(root) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
|
CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
|
||||||
|
@ -1169,7 +1169,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
|
||||||
|
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = WindowTable[i];
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasFocus(root) && !FirstFocusChild(root))
|
if (!HasFocus(root) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
||||||
|
@ -1279,7 +1279,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
|
||||||
NotifyPointer);
|
NotifyPointer);
|
||||||
/* Notify all the roots */
|
/* Notify all the roots */
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]);
|
DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1293,7 +1293,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
|
||||||
}
|
}
|
||||||
/* Notify all the roots */
|
/* Notify all the roots */
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
DeviceFocusEvent(dev, XI_FocusIn, mode, in, WindowTable[i]);
|
DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root);
|
||||||
if (to == PointerRootWin)
|
if (to == PointerRootWin)
|
||||||
DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer);
|
DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer);
|
||||||
}
|
}
|
||||||
|
@ -1305,7 +1305,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
|
||||||
DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode,
|
DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode,
|
||||||
NotifyPointer);
|
NotifyPointer);
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]);
|
DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root);
|
||||||
if (to->parent != NullWindow)
|
if (to->parent != NullWindow)
|
||||||
DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual);
|
DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual);
|
||||||
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to);
|
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to);
|
||||||
|
|
179
dix/events.c
179
dix/events.c
|
@ -485,6 +485,13 @@ SyntheticMotion(DeviceIntPtr dev, int x, int y) {
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
static void PostNewCursor(DeviceIntPtr pDev);
|
static void PostNewCursor(DeviceIntPtr pDev);
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
pointOnScreen(ScreenPtr pScreen, int x, int y)
|
||||||
|
{
|
||||||
|
return x >= pScreen->x && x < pScreen->x + pScreen->width &&
|
||||||
|
y >= pScreen->y && y < pScreen->y + pScreen->height;
|
||||||
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
XineramaSetCursorPosition(
|
XineramaSetCursorPosition(
|
||||||
DeviceIntPtr pDev,
|
DeviceIntPtr pDev,
|
||||||
|
@ -493,7 +500,6 @@ XineramaSetCursorPosition(
|
||||||
Bool generateEvent
|
Bool generateEvent
|
||||||
){
|
){
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
BoxRec box;
|
|
||||||
int i;
|
int i;
|
||||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
|
@ -502,17 +508,16 @@ XineramaSetCursorPosition(
|
||||||
that screen are. */
|
that screen are. */
|
||||||
|
|
||||||
pScreen = pSprite->screen;
|
pScreen = pSprite->screen;
|
||||||
x += panoramiXdataPtr[0].x;
|
x += screenInfo.screens[0]->x;
|
||||||
y += panoramiXdataPtr[0].y;
|
y += screenInfo.screens[0]->y;
|
||||||
|
|
||||||
if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
|
if(!pointOnScreen(pScreen, x, y))
|
||||||
x, y, &box))
|
|
||||||
{
|
{
|
||||||
FOR_NSCREENS(i)
|
FOR_NSCREENS(i)
|
||||||
{
|
{
|
||||||
if(i == pScreen->myNum)
|
if(i == pScreen->myNum)
|
||||||
continue;
|
continue;
|
||||||
if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box))
|
if(pointOnScreen(screenInfo.screens[i], x, y))
|
||||||
{
|
{
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
break;
|
break;
|
||||||
|
@ -521,10 +526,10 @@ XineramaSetCursorPosition(
|
||||||
}
|
}
|
||||||
|
|
||||||
pSprite->screen = pScreen;
|
pSprite->screen = pScreen;
|
||||||
pSprite->hotPhys.x = x - panoramiXdataPtr[0].x;
|
pSprite->hotPhys.x = x - screenInfo.screens[0]->x;
|
||||||
pSprite->hotPhys.y = y - panoramiXdataPtr[0].y;
|
pSprite->hotPhys.y = y - screenInfo.screens[0]->y;
|
||||||
x -= panoramiXdataPtr[pScreen->myNum].x;
|
x -= pScreen->x;
|
||||||
y -= panoramiXdataPtr[pScreen->myNum].y;
|
y -= pScreen->y;
|
||||||
|
|
||||||
return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent);
|
return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent);
|
||||||
}
|
}
|
||||||
|
@ -542,10 +547,10 @@ XineramaConstrainCursor(DeviceIntPtr pDev)
|
||||||
|
|
||||||
/* Translate the constraining box to the screen
|
/* Translate the constraining box to the screen
|
||||||
the sprite is actually on */
|
the sprite is actually on */
|
||||||
newBox.x1 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
|
newBox.x1 += screenInfo.screens[0]->x - pScreen->x;
|
||||||
newBox.x2 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
|
newBox.x2 += screenInfo.screens[0]->x - pScreen->x;
|
||||||
newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
|
newBox.y1 += screenInfo.screens[0]->y - pScreen->y;
|
||||||
newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
|
newBox.y2 += screenInfo.screens[0]->y - pScreen->y;
|
||||||
|
|
||||||
(* pScreen->ConstrainCursor)(pDev, pScreen, &newBox);
|
(* pScreen->ConstrainCursor)(pDev, pScreen, &newBox);
|
||||||
}
|
}
|
||||||
|
@ -556,9 +561,10 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
{
|
{
|
||||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
if(pWin == WindowTable[0]) {
|
if(pWin == screenInfo.screens[0]->root) {
|
||||||
memcpy(pSprite->windows, WindowTable,
|
int i;
|
||||||
PanoramiXNumScreens*sizeof(WindowPtr));
|
for (i = 0; i < PanoramiXNumScreens; i++)
|
||||||
|
pSprite->windows[i] = screenInfo.screens[i]->root;
|
||||||
} else {
|
} else {
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int rc, i;
|
int rc, i;
|
||||||
|
@ -594,12 +600,12 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
||||||
|
|
||||||
REGION_COPY(pSprite->screen, &pSprite->Reg1,
|
REGION_COPY(pSprite->screen, &pSprite->Reg1,
|
||||||
&pSprite->windows[i]->borderSize);
|
&pSprite->windows[i]->borderSize);
|
||||||
off_x = panoramiXdataPtr[i].x;
|
off_x = screenInfo.screens[i]->x;
|
||||||
off_y = panoramiXdataPtr[i].y;
|
off_y = screenInfo.screens[i]->y;
|
||||||
|
|
||||||
while(i--) {
|
while(i--) {
|
||||||
x = off_x - panoramiXdataPtr[i].x;
|
x = off_x - screenInfo.screens[i]->x;
|
||||||
y = off_y - panoramiXdataPtr[i].y;
|
y = off_y - screenInfo.screens[i]->y;
|
||||||
|
|
||||||
if(x || y)
|
if(x || y)
|
||||||
REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y);
|
REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y);
|
||||||
|
@ -607,8 +613,8 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
||||||
REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1,
|
REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1,
|
||||||
&pSprite->windows[i]->borderSize);
|
&pSprite->windows[i]->borderSize);
|
||||||
|
|
||||||
off_x = panoramiXdataPtr[i].x;
|
off_x = screenInfo.screens[i]->x;
|
||||||
off_y = panoramiXdataPtr[i].y;
|
off_y = screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1);
|
pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1);
|
||||||
|
@ -619,7 +625,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
||||||
pSprite->hotShape = NullRegion;
|
pSprite->hotShape = NullRegion;
|
||||||
|
|
||||||
pSprite->confined = FALSE;
|
pSprite->confined = FALSE;
|
||||||
pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin;
|
pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
|
||||||
|
|
||||||
CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
|
CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
|
||||||
}
|
}
|
||||||
|
@ -813,12 +819,12 @@ CheckVirtualMotion(
|
||||||
|
|
||||||
REGION_COPY(pSprite->screen, &pSprite->Reg2,
|
REGION_COPY(pSprite->screen, &pSprite->Reg2,
|
||||||
&pSprite->windows[i]->borderSize);
|
&pSprite->windows[i]->borderSize);
|
||||||
off_x = panoramiXdataPtr[i].x;
|
off_x = screenInfo.screens[i]->x;
|
||||||
off_y = panoramiXdataPtr[i].y;
|
off_y = screenInfo.screens[i]->y;
|
||||||
|
|
||||||
while(i--) {
|
while(i--) {
|
||||||
x = off_x - panoramiXdataPtr[i].x;
|
x = off_x - screenInfo.screens[i]->x;
|
||||||
y = off_y - panoramiXdataPtr[i].y;
|
y = off_y - screenInfo.screens[i]->y;
|
||||||
|
|
||||||
if(x || y)
|
if(x || y)
|
||||||
REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y);
|
REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y);
|
||||||
|
@ -826,8 +832,8 @@ CheckVirtualMotion(
|
||||||
REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2,
|
REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2,
|
||||||
&pSprite->windows[i]->borderSize);
|
&pSprite->windows[i]->borderSize);
|
||||||
|
|
||||||
off_x = panoramiXdataPtr[i].x;
|
off_x = screenInfo.screens[i]->x;
|
||||||
off_y = panoramiXdataPtr[i].y;
|
off_y = screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
@ -875,7 +881,7 @@ CheckVirtualMotion(
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
|
if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
|
||||||
#endif
|
#endif
|
||||||
RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
|
RootWindow(pDev) = pSprite->hot.pScreen->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1123,7 +1129,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
* updated yet.
|
* updated yet.
|
||||||
*/
|
*/
|
||||||
if (ev->any.type == ET_Motion)
|
if (ev->any.type == ET_Motion)
|
||||||
ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
|
ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
|
||||||
|
|
||||||
eventinfo.event = ev;
|
eventinfo.event = ev;
|
||||||
eventinfo.device = device;
|
eventinfo.device = device;
|
||||||
|
@ -1134,10 +1140,8 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
{
|
{
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension) {
|
if(!noPanoramiXExtension) {
|
||||||
event->root_x += panoramiXdataPtr[pSprite->screen->myNum].x -
|
event->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
|
||||||
panoramiXdataPtr[0].x;
|
event->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
|
||||||
event->root_y += panoramiXdataPtr[pSprite->screen->myNum].y -
|
|
||||||
panoramiXdataPtr[0].y;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
pSprite->hotPhys.x = event->root_x;
|
pSprite->hotPhys.x = event->root_x;
|
||||||
|
@ -1217,10 +1221,10 @@ PlayReleasedEvents(void)
|
||||||
case ET_KeyRelease:
|
case ET_KeyRelease:
|
||||||
case ET_ProximityIn:
|
case ET_ProximityIn:
|
||||||
case ET_ProximityOut:
|
case ET_ProximityOut:
|
||||||
ev->root_x += panoramiXdataPtr[0].x -
|
ev->root_x += screenInfo.screens[0]->x -
|
||||||
panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].x;
|
pDev->spriteInfo->sprite->screen->x;
|
||||||
ev->root_y += panoramiXdataPtr[0].y -
|
ev->root_y += screenInfo.screens[0]->y -
|
||||||
panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].y;
|
pDev->spriteInfo->sprite->screen->y;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1339,7 +1343,7 @@ playmore:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ConfineCursorToWindow(dev,
|
ConfineCursorToWindow(dev,
|
||||||
WindowTable[dev->spriteInfo->sprite->hotPhys.pScreen->myNum],
|
dev->spriteInfo->sprite->hotPhys.pScreen->root,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
PostNewCursor(dev);
|
PostNewCursor(dev);
|
||||||
}
|
}
|
||||||
|
@ -1369,7 +1373,7 @@ ScreenRestructured (ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ConfineCursorToWindow(pDev,
|
ConfineCursorToWindow(pDev,
|
||||||
WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum],
|
pDev->spriteInfo->sprite->hotPhys.pScreen->root,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2560,8 +2564,8 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
if(POINT_IN_REGION(pSprite->screen,
|
if(POINT_IN_REGION(pSprite->screen,
|
||||||
&pSprite->windows[i]->borderSize,
|
&pSprite->windows[i]->borderSize,
|
||||||
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
|
x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
|
||||||
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
|
y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
|
||||||
&box))
|
&box))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2756,17 +2760,15 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
|
||||||
/* Motion events entering DIX get translated to Screen 0
|
/* Motion events entering DIX get translated to Screen 0
|
||||||
coordinates. Replayed events have already been
|
coordinates. Replayed events have already been
|
||||||
translated since they've entered DIX before */
|
translated since they've entered DIX before */
|
||||||
ev->root_x += panoramiXdataPtr[pSprite->screen->myNum].x -
|
ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
|
||||||
panoramiXdataPtr[0].x;
|
ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
|
||||||
ev->root_y += panoramiXdataPtr[pSprite->screen->myNum].y -
|
|
||||||
panoramiXdataPtr[0].y;
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
|
if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
|
||||||
{
|
{
|
||||||
pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
|
pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
|
||||||
RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
|
RootWindow(pDev) = pSprite->hot.pScreen->root;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2849,7 +2851,7 @@ WindowsRestructured(void)
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
/* This was added to support reconfiguration under Xdmx. The problem is
|
/* This was added to support reconfiguration under Xdmx. The problem is
|
||||||
* that if the 0th screen (i.e., WindowTable[0]) is moved to an origin
|
* that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin
|
||||||
* other than 0,0, the information in the private sprite structure must
|
* other than 0,0, the information in the private sprite structure must
|
||||||
* be updated accordingly, or XYToWindow (and other routines) will not
|
* be updated accordingly, or XYToWindow (and other routines) will not
|
||||||
* compute correctly. */
|
* compute correctly. */
|
||||||
|
@ -2892,7 +2894,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
|
||||||
} else
|
} else
|
||||||
ConfineCursorToWindow(
|
ConfineCursorToWindow(
|
||||||
pDev,
|
pDev,
|
||||||
WindowTable[pSprite->hotPhys.pScreen->myNum],
|
pSprite->hotPhys.pScreen->root,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3007,10 +3009,10 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
}
|
}
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension) {
|
if(!noPanoramiXExtension) {
|
||||||
pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x;
|
pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
|
||||||
pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y;
|
pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
|
||||||
pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x;
|
pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
|
||||||
pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y;
|
pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
|
||||||
pSprite->physLimits = pSprite->hotLimits;
|
pSprite->physLimits = pSprite->hotLimits;
|
||||||
pSprite->confineWin = NullWindow;
|
pSprite->confineWin = NullWindow;
|
||||||
pSprite->hotShape = NullRegion;
|
pSprite->hotShape = NullRegion;
|
||||||
|
@ -3051,7 +3053,7 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
|
|
||||||
pSprite = pDev->spriteInfo->sprite;
|
pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
win = WindowTable[pScreen->myNum];
|
win = pScreen->root;
|
||||||
|
|
||||||
pSprite->hotPhys.pScreen = pScreen;
|
pSprite->hotPhys.pScreen = pScreen;
|
||||||
pSprite->hot = pSprite->hotPhys;
|
pSprite->hot = pSprite->hotPhys;
|
||||||
|
@ -3077,10 +3079,10 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension) {
|
if(!noPanoramiXExtension) {
|
||||||
pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x;
|
pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
|
||||||
pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y;
|
pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
|
||||||
pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x;
|
pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
|
||||||
pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y;
|
pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
|
||||||
pSprite->physLimits = pSprite->hotLimits;
|
pSprite->physLimits = pSprite->hotLimits;
|
||||||
pSprite->screen = pScreen;
|
pSprite->screen = pScreen;
|
||||||
}
|
}
|
||||||
|
@ -3113,10 +3115,8 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
|
||||||
pSprite->hotPhys.y = y;
|
pSprite->hotPhys.y = y;
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension) {
|
if(!noPanoramiXExtension) {
|
||||||
pSprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x -
|
pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x;
|
||||||
panoramiXdataPtr[0].x;
|
pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y;
|
||||||
pSprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y -
|
|
||||||
panoramiXdataPtr[0].y;
|
|
||||||
if (newScreen != pSprite->screen) {
|
if (newScreen != pSprite->screen) {
|
||||||
pSprite->screen = newScreen;
|
pSprite->screen = newScreen;
|
||||||
/* Make sure we tell the DDX to update its copy of the screen */
|
/* Make sure we tell the DDX to update its copy of the screen */
|
||||||
|
@ -3124,23 +3124,22 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
|
||||||
XineramaConfineCursorToWindow(pDev,
|
XineramaConfineCursorToWindow(pDev,
|
||||||
pSprite->confineWin, TRUE);
|
pSprite->confineWin, TRUE);
|
||||||
else
|
else
|
||||||
XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE);
|
XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
|
||||||
/* if the pointer wasn't confined, the DDX won't get
|
/* if the pointer wasn't confined, the DDX won't get
|
||||||
told of the pointer warp so we reposition it here */
|
told of the pointer warp so we reposition it here */
|
||||||
if(!syncEvents.playingEvents)
|
if(!syncEvents.playingEvents)
|
||||||
(*pSprite->screen->SetCursorPosition)(
|
(*pSprite->screen->SetCursorPosition)(
|
||||||
pDev,
|
pDev,
|
||||||
pSprite->screen,
|
pSprite->screen,
|
||||||
pSprite->hotPhys.x + panoramiXdataPtr[0].x -
|
pSprite->hotPhys.x + screenInfo.screens[0]->x -
|
||||||
panoramiXdataPtr[pSprite->screen->myNum].x,
|
pSprite->screen->x,
|
||||||
pSprite->hotPhys.y + panoramiXdataPtr[0].y -
|
pSprite->hotPhys.y + screenInfo.screens[0]->y -
|
||||||
panoramiXdataPtr[pSprite->screen->myNum].y, FALSE);
|
pSprite->screen->y, FALSE);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (newScreen != pSprite->hotPhys.pScreen)
|
if (newScreen != pSprite->hotPhys.pScreen)
|
||||||
ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum],
|
ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE);
|
||||||
TRUE, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
|
@ -3163,14 +3162,14 @@ XineramaPointInWindowIsVisible(
|
||||||
|
|
||||||
if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE;
|
if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE;
|
||||||
|
|
||||||
xoff = x + panoramiXdataPtr[0].x;
|
xoff = x + screenInfo.screens[0]->x;
|
||||||
yoff = y + panoramiXdataPtr[0].y;
|
yoff = y + screenInfo.screens[0]->y;
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
|
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
x = xoff - panoramiXdataPtr[i].x;
|
x = xoff - screenInfo.screens[i]->x;
|
||||||
y = yoff - panoramiXdataPtr[i].y;
|
y = yoff - screenInfo.screens[i]->y;
|
||||||
|
|
||||||
if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
|
if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
|
||||||
&& (!wInputShape(pWin) ||
|
&& (!wInputShape(pWin) ||
|
||||||
|
@ -3215,9 +3214,9 @@ XineramaWarpPointer(ClientPtr client)
|
||||||
|
|
||||||
winX = source->drawable.x;
|
winX = source->drawable.x;
|
||||||
winY = source->drawable.y;
|
winY = source->drawable.y;
|
||||||
if(source == WindowTable[0]) {
|
if(source == screenInfo.screens[0]->root) {
|
||||||
winX -= panoramiXdataPtr[0].x;
|
winX -= screenInfo.screens[0]->x;
|
||||||
winY -= panoramiXdataPtr[0].y;
|
winY -= screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
if (x < winX + stuff->srcX ||
|
if (x < winX + stuff->srcX ||
|
||||||
y < winY + stuff->srcY ||
|
y < winY + stuff->srcY ||
|
||||||
|
@ -3231,9 +3230,9 @@ XineramaWarpPointer(ClientPtr client)
|
||||||
if (dest) {
|
if (dest) {
|
||||||
x = dest->drawable.x;
|
x = dest->drawable.x;
|
||||||
y = dest->drawable.y;
|
y = dest->drawable.y;
|
||||||
if(dest == WindowTable[0]) {
|
if(dest == screenInfo.screens[0]->root) {
|
||||||
x -= panoramiXdataPtr[0].x;
|
x -= screenInfo.screens[0]->x;
|
||||||
y -= panoramiXdataPtr[0].y;
|
y -= screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4997,11 +4996,11 @@ ProcQueryPointer(ClientPtr client)
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension) {
|
if(!noPanoramiXExtension) {
|
||||||
rep.rootX += panoramiXdataPtr[0].x;
|
rep.rootX += screenInfo.screens[0]->x;
|
||||||
rep.rootY += panoramiXdataPtr[0].y;
|
rep.rootY += screenInfo.screens[0]->y;
|
||||||
if(stuff->id == rep.root) {
|
if(stuff->id == rep.root) {
|
||||||
rep.winX += panoramiXdataPtr[0].x;
|
rep.winX += screenInfo.screens[0]->x;
|
||||||
rep.winY += panoramiXdataPtr[0].y;
|
rep.winY += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -5670,7 +5669,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension &&
|
if(!noPanoramiXExtension &&
|
||||||
(panoramiXdataPtr[0].x || panoramiXdataPtr[0].y))
|
(screenInfo.screens[0]->x || screenInfo.screens[0]->y))
|
||||||
{
|
{
|
||||||
switch(events->u.u.type) {
|
switch(events->u.u.type) {
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
|
@ -5687,13 +5686,13 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
|
||||||
*/
|
*/
|
||||||
count = 1; /* should always be 1 */
|
count = 1; /* should always be 1 */
|
||||||
memcpy(&eventCopy, events, sizeof(xEvent));
|
memcpy(&eventCopy, events, sizeof(xEvent));
|
||||||
eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x;
|
eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x;
|
||||||
eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y;
|
eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y;
|
||||||
if(eventCopy.u.keyButtonPointer.event ==
|
if(eventCopy.u.keyButtonPointer.event ==
|
||||||
eventCopy.u.keyButtonPointer.root)
|
eventCopy.u.keyButtonPointer.root)
|
||||||
{
|
{
|
||||||
eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x;
|
eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x;
|
||||||
eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y;
|
eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
events = &eventCopy;
|
events = &eventCopy;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1210,8 +1210,8 @@ PostSyntheticMotion(DeviceIntPtr pDev,
|
||||||
will translate from sprite screen to screen 0 upon reentry
|
will translate from sprite screen to screen 0 upon reentry
|
||||||
to the DIX layer. */
|
to the DIX layer. */
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
x += panoramiXdataPtr[0].x - panoramiXdataPtr[screen].x;
|
x += screenInfo.screens[0]->x - screenInfo.screens[screen]->x;
|
||||||
y += panoramiXdataPtr[0].y - panoramiXdataPtr[screen].y;
|
y += screenInfo.screens[0]->y - screenInfo.screens[screen]->y;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -83,8 +83,6 @@ ClientPtr serverClient;
|
||||||
int currentMaxClients; /* current size of clients array */
|
int currentMaxClients; /* current size of clients array */
|
||||||
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
||||||
|
|
||||||
WindowPtr WindowTable[MAXSCREENS];
|
|
||||||
|
|
||||||
unsigned long globalSerialNumber = 0;
|
unsigned long globalSerialNumber = 0;
|
||||||
unsigned long serverGeneration = 0;
|
unsigned long serverGeneration = 0;
|
||||||
|
|
||||||
|
@ -137,5 +135,3 @@ char *display;
|
||||||
char *ConnectionInfo;
|
char *ConnectionInfo;
|
||||||
|
|
||||||
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
|
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
|
||||||
|
|
||||||
DDXPointRec dixScreenOrigins[MAXSCREENS];
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
InitRootWindow(WindowTable[i]);
|
InitRootWindow(screenInfo.screens[i]->root);
|
||||||
|
|
||||||
InitCoreDevices();
|
InitCoreDevices();
|
||||||
InitInput(argc, argv);
|
InitInput(argc, argv);
|
||||||
|
@ -303,7 +303,8 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
|
|
||||||
CloseInput();
|
CloseInput();
|
||||||
|
|
||||||
memset(WindowTable, 0, sizeof(WindowTable));
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
|
screenInfo.screens[i]->root = NullWindow;
|
||||||
CloseDownDevices();
|
CloseDownDevices();
|
||||||
CloseDownEvents();
|
CloseDownEvents();
|
||||||
|
|
||||||
|
|
102
dix/window.c
102
dix/window.c
|
@ -151,12 +151,10 @@ WindowSeekDeviceCursor(WindowPtr pWin,
|
||||||
|
|
||||||
int screenIsSaved = SCREEN_SAVER_OFF;
|
int screenIsSaved = SCREEN_SAVER_OFF;
|
||||||
|
|
||||||
ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
|
|
||||||
|
|
||||||
static int FocusPrivatesKeyIndex;
|
static int FocusPrivatesKeyIndex;
|
||||||
DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex;
|
DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex;
|
||||||
|
|
||||||
static Bool TileScreenSaver(int i, int kind);
|
static Bool TileScreenSaver(ScreenPtr pScreen, int kind);
|
||||||
|
|
||||||
|
|
||||||
#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \
|
#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \
|
||||||
|
@ -212,7 +210,7 @@ PrintWindowTree(void)
|
||||||
for (i=0; i<screenInfo.numScreens; i++)
|
for (i=0; i<screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
ErrorF("[dix] WINDOW %d\n", i);
|
ErrorF("[dix] WINDOW %d\n", i);
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
miPrintRegion(&pWin->clipList);
|
miPrintRegion(&pWin->clipList);
|
||||||
p1 = pWin->firstChild;
|
p1 = pWin->firstChild;
|
||||||
PrintChildren(p1, 4);
|
PrintChildren(p1, 4);
|
||||||
|
@ -258,7 +256,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||||
int
|
int
|
||||||
WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
|
WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
|
||||||
{
|
{
|
||||||
return(TraverseTree(WindowTable[pScreen->myNum], func, data));
|
return(TraverseTree(pScreen->root, func, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hack for forcing backing store on all windows */
|
/* hack for forcing backing store on all windows */
|
||||||
|
@ -363,12 +361,12 @@ CreateRootWindow(ScreenPtr pScreen)
|
||||||
if (!pWin)
|
if (!pWin)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
savedScreenInfo[pScreen->myNum].pWindow = NULL;
|
pScreen->screensaver.pWindow = NULL;
|
||||||
savedScreenInfo[pScreen->myNum].wid = FakeClientID(0);
|
pScreen->screensaver.wid = FakeClientID(0);
|
||||||
savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL;
|
pScreen->screensaver.ExternalScreenSaver = NULL;
|
||||||
screenIsSaved = SCREEN_SAVER_OFF;
|
screenIsSaved = SCREEN_SAVER_OFF;
|
||||||
|
|
||||||
WindowTable[pScreen->myNum] = pWin;
|
pScreen->root = pWin;
|
||||||
|
|
||||||
pWin->drawable.pScreen = pScreen;
|
pWin->drawable.pScreen = pScreen;
|
||||||
pWin->drawable.type = DRAWABLE_WINDOW;
|
pWin->drawable.type = DRAWABLE_WINDOW;
|
||||||
|
@ -539,7 +537,7 @@ RealChildHead(WindowPtr pWin)
|
||||||
|
|
||||||
if (!pWin->parent &&
|
if (!pWin->parent &&
|
||||||
(screenIsSaved == SCREEN_SAVER_ON) &&
|
(screenIsSaved == SCREEN_SAVER_ON) &&
|
||||||
(HasSaverWindow (pWin->drawable.pScreen->myNum)))
|
(HasSaverWindow (pWin->drawable.pScreen)))
|
||||||
return (pWin->firstChild);
|
return (pWin->firstChild);
|
||||||
else
|
else
|
||||||
return (NullWindow);
|
return (NullWindow);
|
||||||
|
@ -1329,7 +1327,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||||
*/
|
*/
|
||||||
if ( cursorID == None)
|
if ( cursorID == None)
|
||||||
{
|
{
|
||||||
if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
|
if (pWin == pWin->drawable.pScreen->root)
|
||||||
pCursor = rootCursor;
|
pCursor = rootCursor;
|
||||||
else
|
else
|
||||||
pCursor = (CursorPtr) None;
|
pCursor = (CursorPtr) None;
|
||||||
|
@ -2238,8 +2236,8 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
|
||||||
event.u.configureRequest.y = y;
|
event.u.configureRequest.y = y;
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
|
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
|
||||||
event.u.configureRequest.x += panoramiXdataPtr[0].x;
|
event.u.configureRequest.x += screenInfo.screens[0]->x;
|
||||||
event.u.configureRequest.y += panoramiXdataPtr[0].y;
|
event.u.configureRequest.y += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
event.u.configureRequest.width = w;
|
event.u.configureRequest.width = w;
|
||||||
|
@ -2319,8 +2317,8 @@ ActuallyDoSomething:
|
||||||
event.u.configureNotify.y = y;
|
event.u.configureNotify.y = y;
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
|
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
|
||||||
event.u.configureNotify.x += panoramiXdataPtr[0].x;
|
event.u.configureNotify.x += screenInfo.screens[0]->x;
|
||||||
event.u.configureNotify.y += panoramiXdataPtr[0].y;
|
event.u.configureNotify.y += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
event.u.configureNotify.width = w;
|
event.u.configureNotify.width = w;
|
||||||
|
@ -2473,8 +2471,8 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
|
||||||
event.u.reparent.y = y;
|
event.u.reparent.y = y;
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if(!noPanoramiXExtension && !pParent->parent) {
|
if(!noPanoramiXExtension && !pParent->parent) {
|
||||||
event.u.reparent.x += panoramiXdataPtr[0].x;
|
event.u.reparent.x += screenInfo.screens[0]->x;
|
||||||
event.u.reparent.y += panoramiXdataPtr[0].y;
|
event.u.reparent.y += screenInfo.screens[0]->y;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
event.u.reparent.override = pWin->overrideRedirect;
|
event.u.reparent.override = pWin->overrideRedirect;
|
||||||
|
@ -2966,7 +2964,7 @@ HandleSaveSet(ClientPtr client)
|
||||||
pWin = SaveSetWindow(client->saveSet[j]);
|
pWin = SaveSetWindow(client->saveSet[j]);
|
||||||
#ifdef XFIXES
|
#ifdef XFIXES
|
||||||
if (SaveSetToRoot(client->saveSet[j]))
|
if (SaveSetToRoot(client->saveSet[j]))
|
||||||
pParent = WindowTable[pWin->drawable.pScreen->myNum];
|
pParent = pWin->drawable.pScreen->root;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -3034,7 +3032,7 @@ NotClippedByChildren(WindowPtr pWin)
|
||||||
pReg = REGION_CREATE(pScreen, NullBox, 1);
|
pReg = REGION_CREATE(pScreen, NullBox, 1);
|
||||||
if (pWin->parent ||
|
if (pWin->parent ||
|
||||||
screenIsSaved != SCREEN_SAVER_ON ||
|
screenIsSaved != SCREEN_SAVER_ON ||
|
||||||
!HasSaverWindow (pWin->drawable.pScreen->myNum))
|
!HasSaverWindow (pWin->drawable.pScreen))
|
||||||
{
|
{
|
||||||
REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize);
|
REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize);
|
||||||
}
|
}
|
||||||
|
@ -3152,33 +3150,33 @@ dixSaveScreens(ClientPtr client, int on, int mode)
|
||||||
}
|
}
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
if (on == SCREEN_SAVER_FORCER)
|
if (on == SCREEN_SAVER_FORCER)
|
||||||
(* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], on);
|
(* pScreen->SaveScreen) (pScreen, on);
|
||||||
if (savedScreenInfo[i].ExternalScreenSaver)
|
if (pScreen->screensaver.ExternalScreenSaver)
|
||||||
{
|
{
|
||||||
if ((*savedScreenInfo[i].ExternalScreenSaver)
|
if ((*pScreen->screensaver.ExternalScreenSaver)
|
||||||
(screenInfo.screens[i], type, on == SCREEN_SAVER_FORCER))
|
(pScreen, type, on == SCREEN_SAVER_FORCER))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (type == screenIsSaved)
|
if (type == screenIsSaved)
|
||||||
continue;
|
continue;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SCREEN_SAVER_OFF:
|
case SCREEN_SAVER_OFF:
|
||||||
if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED)
|
if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED)
|
||||||
{
|
{
|
||||||
(* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i],
|
(* pScreen->SaveScreen) (pScreen, what);
|
||||||
what);
|
|
||||||
}
|
}
|
||||||
else if (HasSaverWindow (i))
|
else if (HasSaverWindow (pScreen))
|
||||||
{
|
{
|
||||||
savedScreenInfo[i].pWindow = NullWindow;
|
pScreen->screensaver.pWindow = NullWindow;
|
||||||
FreeResource(savedScreenInfo[i].wid, RT_NONE);
|
FreeResource(pScreen->screensaver.wid, RT_NONE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCREEN_SAVER_CYCLE:
|
case SCREEN_SAVER_CYCLE:
|
||||||
if (savedScreenInfo[i].blanked == SCREEN_IS_TILED)
|
if (pScreen->screensaver.blanked == SCREEN_IS_TILED)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = savedScreenInfo[i].pWindow;
|
WindowPtr pWin = pScreen->screensaver.pWindow;
|
||||||
/* make it look like screen saver is off, so that
|
/* make it look like screen saver is off, so that
|
||||||
* NotClippedByChildren will compute a clip list
|
* NotClippedByChildren will compute a clip list
|
||||||
* for the root window, so miPaintWindow works
|
* for the root window, so miPaintWindow works
|
||||||
|
@ -3202,35 +3200,33 @@ dixSaveScreens(ClientPtr client, int on, int mode)
|
||||||
* Call the DDX saver in case it wants to do something
|
* Call the DDX saver in case it wants to do something
|
||||||
* at cycle time
|
* at cycle time
|
||||||
*/
|
*/
|
||||||
else if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED)
|
else if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED)
|
||||||
{
|
{
|
||||||
(* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i],
|
(* pScreen->SaveScreen) (pScreen, type);
|
||||||
type);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCREEN_SAVER_ON:
|
case SCREEN_SAVER_ON:
|
||||||
if (ScreenSaverBlanking != DontPreferBlanking)
|
if (ScreenSaverBlanking != DontPreferBlanking)
|
||||||
{
|
{
|
||||||
if ((* screenInfo.screens[i]->SaveScreen)
|
if ((* pScreen->SaveScreen) (pScreen, what))
|
||||||
(screenInfo.screens[i], what))
|
|
||||||
{
|
{
|
||||||
savedScreenInfo[i].blanked = SCREEN_IS_BLANKED;
|
pScreen->screensaver.blanked = SCREEN_IS_BLANKED;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((ScreenSaverAllowExposures != DontAllowExposures) &&
|
if ((ScreenSaverAllowExposures != DontAllowExposures) &&
|
||||||
TileScreenSaver(i, SCREEN_IS_BLACK))
|
TileScreenSaver(pScreen, SCREEN_IS_BLACK))
|
||||||
{
|
{
|
||||||
savedScreenInfo[i].blanked = SCREEN_IS_BLACK;
|
pScreen->screensaver.blanked = SCREEN_IS_BLACK;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((ScreenSaverAllowExposures != DontAllowExposures) &&
|
if ((ScreenSaverAllowExposures != DontAllowExposures) &&
|
||||||
TileScreenSaver(i, SCREEN_IS_TILED))
|
TileScreenSaver(pScreen, SCREEN_IS_TILED))
|
||||||
{
|
{
|
||||||
savedScreenInfo[i].blanked = SCREEN_IS_TILED;
|
pScreen->screensaver.blanked = SCREEN_IS_TILED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
savedScreenInfo[i].blanked = SCREEN_ISNT_SAVED;
|
pScreen->screensaver.blanked = SCREEN_ISNT_SAVED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3252,7 +3248,7 @@ SaveScreens(int on, int mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
TileScreenSaver(int i, int kind)
|
TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
int result;
|
int result;
|
||||||
|
@ -3269,9 +3265,9 @@ TileScreenSaver(int i, int kind)
|
||||||
attri = 0;
|
attri = 0;
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case SCREEN_IS_TILED:
|
case SCREEN_IS_TILED:
|
||||||
switch (WindowTable[i]->backgroundState) {
|
switch (pScreen->root->backgroundState) {
|
||||||
case BackgroundPixel:
|
case BackgroundPixel:
|
||||||
attributes[attri++] = WindowTable[i]->background.pixel;
|
attributes[attri++] = pScreen->root->background.pixel;
|
||||||
mask |= CWBackPixel;
|
mask |= CWBackPixel;
|
||||||
break;
|
break;
|
||||||
case BackgroundPixmap:
|
case BackgroundPixmap:
|
||||||
|
@ -3283,7 +3279,7 @@ TileScreenSaver(int i, int kind)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCREEN_IS_BLACK:
|
case SCREEN_IS_BLACK:
|
||||||
attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel;
|
attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel;
|
||||||
mask |= CWBackPixel;
|
mask |= CWBackPixel;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3330,14 +3326,14 @@ TileScreenSaver(int i, int kind)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pWin = savedScreenInfo[i].pWindow =
|
pWin = pScreen->screensaver.pWindow =
|
||||||
CreateWindow(savedScreenInfo[i].wid,
|
CreateWindow(pScreen->screensaver.wid,
|
||||||
WindowTable[i],
|
pScreen->root,
|
||||||
-RANDOM_WIDTH, -RANDOM_WIDTH,
|
-RANDOM_WIDTH, -RANDOM_WIDTH,
|
||||||
(unsigned short)screenInfo.screens[i]->width + RANDOM_WIDTH,
|
(unsigned short)pScreen->width + RANDOM_WIDTH,
|
||||||
(unsigned short)screenInfo.screens[i]->height + RANDOM_WIDTH,
|
(unsigned short)pScreen->height + RANDOM_WIDTH,
|
||||||
0, InputOutput, mask, attributes, 0, serverClient,
|
0, InputOutput, mask, attributes, 0, serverClient,
|
||||||
wVisual (WindowTable[i]), &result);
|
wVisual (pScreen->root), &result);
|
||||||
|
|
||||||
if (cursor)
|
if (cursor)
|
||||||
FreeResource (cursorID, RT_NONE);
|
FreeResource (cursorID, RT_NONE);
|
||||||
|
@ -3346,7 +3342,7 @@ TileScreenSaver(int i, int kind)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!AddResource(pWin->drawable.id, RT_WINDOW,
|
if (!AddResource(pWin->drawable.id, RT_WINDOW,
|
||||||
(pointer)savedScreenInfo[i].pWindow))
|
(pointer)pScreen->screensaver.pWindow))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (mask & CWBackPixmap)
|
if (mask & CWBackPixmap)
|
||||||
|
|
2
fb/fb.h
2
fb/fb.h
|
@ -740,7 +740,7 @@ typedef struct {
|
||||||
|
|
||||||
#define fbWindowEnabled(pWin) \
|
#define fbWindowEnabled(pWin) \
|
||||||
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
|
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
|
||||||
&WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
|
&(pWin)->drawable.pScreen->root->borderClip)
|
||||||
|
|
||||||
#define fbDrawableEnabled(pDrawable) \
|
#define fbDrawableEnabled(pDrawable) \
|
||||||
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
||||||
|
|
|
@ -230,7 +230,7 @@ static int dmxSLFindNext(int *list)
|
||||||
/** Make one pass over all the screens and return the number updated. */
|
/** Make one pass over all the screens and return the number updated. */
|
||||||
static int dmxTryComputeScreenOrigins(int *screensLeft)
|
static int dmxTryComputeScreenOrigins(int *screensLeft)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen, refScreen;
|
||||||
DMXScreenInfo *screen;
|
DMXScreenInfo *screen;
|
||||||
int i, ref;
|
int i, ref;
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
|
@ -239,54 +239,56 @@ static int dmxTryComputeScreenOrigins(int *screensLeft)
|
||||||
if (!screensLeft[i])
|
if (!screensLeft[i])
|
||||||
continue;
|
continue;
|
||||||
screen = &dmxScreens[i];
|
screen = &dmxScreens[i];
|
||||||
|
pScreen = screenInfo.screens[i];
|
||||||
switch (screen->where) {
|
switch (screen->where) {
|
||||||
case PosAbsolute:
|
case PosAbsolute:
|
||||||
dixScreenOrigins[i].x = screen->whereX;
|
pScreen->x = screen->whereX;
|
||||||
dixScreenOrigins[i].y = screen->whereY;
|
pScreen->y = screen->whereY;
|
||||||
++changed, screensLeft[i] = 0;
|
++changed, screensLeft[i] = 0;
|
||||||
break;
|
break;
|
||||||
case PosRelative:
|
case PosRelative:
|
||||||
ref = screen->whereRefScreen;
|
ref = screen->whereRefScreen;
|
||||||
if (screensLeft[ref])
|
if (screensLeft[ref])
|
||||||
break;
|
break;
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->whereX;
|
refScreen = screenInfo.screens[ref];
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->whereY;
|
pScreen->x = refScreen->x + screen->whereX;
|
||||||
|
pScreen->y = refScreen->y + screen->whereY;
|
||||||
++changed, screensLeft[i] = 0;
|
++changed, screensLeft[i] = 0;
|
||||||
break;
|
break;
|
||||||
case PosRightOf:
|
case PosRightOf:
|
||||||
ref = screen->whereRefScreen;
|
ref = screen->whereRefScreen;
|
||||||
if (screensLeft[ref])
|
if (screensLeft[ref])
|
||||||
break;
|
break;
|
||||||
pScreen = screenInfo.screens[ref];
|
refScreen = screenInfo.screens[ref];
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x + pScreen->width;
|
pScreen->x = refScreen->x + refScreen->width;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y;
|
pScreen->y = refScreen->y;
|
||||||
++changed, screensLeft[i] = 0;
|
++changed, screensLeft[i] = 0;
|
||||||
break;
|
break;
|
||||||
case PosLeftOf:
|
case PosLeftOf:
|
||||||
ref = screen->whereRefScreen;
|
ref = screen->whereRefScreen;
|
||||||
if (screensLeft[ref])
|
if (screensLeft[ref])
|
||||||
break;
|
break;
|
||||||
pScreen = screenInfo.screens[i];
|
refScreen = screenInfo.screens[ref];
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x - pScreen->width;
|
pScreen->x = refScreen->x - pScreen->width;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y;
|
pScreen->y = refScreen->y;
|
||||||
++changed, screensLeft[i] = 0;
|
++changed, screensLeft[i] = 0;
|
||||||
break;
|
break;
|
||||||
case PosBelow:
|
case PosBelow:
|
||||||
ref = screen->whereRefScreen;
|
ref = screen->whereRefScreen;
|
||||||
if (screensLeft[ref])
|
if (screensLeft[ref])
|
||||||
break;
|
break;
|
||||||
pScreen = screenInfo.screens[ref];
|
refScreen = screenInfo.screens[ref];
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x;
|
pScreen->x = refScreen->x;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y + pScreen->height;
|
pScreen->y = refScreen->y + refScreen->height;
|
||||||
++changed, screensLeft[i] = 0;
|
++changed, screensLeft[i] = 0;
|
||||||
break;
|
break;
|
||||||
case PosAbove:
|
case PosAbove:
|
||||||
ref = screen->whereRefScreen;
|
ref = screen->whereRefScreen;
|
||||||
if (screensLeft[ref])
|
if (screensLeft[ref])
|
||||||
break;
|
break;
|
||||||
pScreen = screenInfo.screens[i];
|
refScreen = screenInfo.screens[ref];
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x;
|
pScreen->x = refScreen->x;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y - pScreen->height;
|
pScreen->y = refScreen->y - pScreen->height;
|
||||||
++changed, screensLeft[i] = 0;
|
++changed, screensLeft[i] = 0;
|
||||||
break;
|
break;
|
||||||
case PosNone:
|
case PosNone:
|
||||||
|
@ -298,6 +300,7 @@ static int dmxTryComputeScreenOrigins(int *screensLeft)
|
||||||
|
|
||||||
static void dmxComputeScreenOrigins(void)
|
static void dmxComputeScreenOrigins(void)
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen;
|
||||||
int *screensLeft;
|
int *screensLeft;
|
||||||
int i, ref;
|
int i, ref;
|
||||||
int minX, minY;
|
int minX, minY;
|
||||||
|
@ -313,8 +316,9 @@ static void dmxComputeScreenOrigins(void)
|
||||||
* guarantees that we will eventually terminate.
|
* guarantees that we will eventually terminate.
|
||||||
*/
|
*/
|
||||||
ref = dmxScreens[i].whereRefScreen;
|
ref = dmxScreens[i].whereRefScreen;
|
||||||
dixScreenOrigins[ref].x = dixScreenOrigins[ref].y = 0;
|
pScreen = screenInfo.screens[ref];
|
||||||
screensLeft[ref] = 0;
|
pScreen->x = pScreen->y = 0;
|
||||||
|
screensLeft[ref] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dmxSLFree(screensLeft);
|
dmxSLFree(screensLeft);
|
||||||
|
@ -322,18 +326,18 @@ static void dmxComputeScreenOrigins(void)
|
||||||
|
|
||||||
/* Justify the topmost and leftmost to
|
/* Justify the topmost and leftmost to
|
||||||
* (0,0). */
|
* (0,0). */
|
||||||
minX = dixScreenOrigins[0].x;
|
minX = screenInfo.screens[0]->x;
|
||||||
minY = dixScreenOrigins[0].y;
|
minY = screenInfo.screens[0]->y;
|
||||||
for (i = 1; i < dmxNumScreens; i++) { /* Compute minX, minY */
|
for (i = 1; i < dmxNumScreens; i++) { /* Compute minX, minY */
|
||||||
if (dixScreenOrigins[i].x < minX)
|
if (screenInfo.screens[i]->x < minX)
|
||||||
minX = dixScreenOrigins[i].x;
|
minX = screenInfo.screens[i]->x;
|
||||||
if (dixScreenOrigins[i].y < minY)
|
if (screenInfo.screens[i]->y < minY)
|
||||||
minY = dixScreenOrigins[i].y;
|
minY = screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
if (minX || minY) {
|
if (minX || minY) {
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
dixScreenOrigins[i].x -= minX;
|
screenInfo.screens[i]->x -= minX;
|
||||||
dixScreenOrigins[i].y -= minY;
|
screenInfo.screens[i]->y -= minY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,8 +402,8 @@ void dmxInitOrigins(void)
|
||||||
|
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[i];
|
DMXScreenInfo *dmxScreen = &dmxScreens[i];
|
||||||
dmxScreen->rootXOrigin = dixScreenOrigins[i].x;
|
dmxScreen->rootXOrigin = screenInfo.screens[i]->x;
|
||||||
dmxScreen->rootYOrigin = dixScreenOrigins[i].y;
|
dmxScreen->rootYOrigin = screenInfo.screens[i]->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
dmxReInitOrigins();
|
dmxReInitOrigins();
|
||||||
|
|
|
@ -297,7 +297,7 @@ void dmxFlushPendingSyncs(void)
|
||||||
void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
|
void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ static void dmxConfigureScreenWindow(int idx,
|
||||||
static void dmxConfigureRootWindow(int idx, int x, int y, int w, int h)
|
static void dmxConfigureRootWindow(int idx, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = screenInfo.screens[idx]->root;
|
||||||
|
|
||||||
/* NOTE: Either this function or the ones that it calls must handle
|
/* NOTE: Either this function or the ones that it calls must handle
|
||||||
* the case where w == 0 || h == 0. Currently, the functions that
|
* the case where w == 0 || h == 0. Currently, the functions that
|
||||||
|
@ -437,7 +437,7 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
||||||
ScreenPtr pScreen = screenInfo.screens[idx];
|
ScreenPtr pScreen = screenInfo.screens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
int xoff;
|
int xoff;
|
||||||
int yoff;
|
int yoff;
|
||||||
|
@ -447,18 +447,18 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
|
||||||
dmxScreen->rootYOrigin = y;
|
dmxScreen->rootYOrigin = y;
|
||||||
|
|
||||||
/* Compute offsets here in case <x,y> has been changed above */
|
/* Compute offsets here in case <x,y> has been changed above */
|
||||||
xoff = x - dixScreenOrigins[idx].x;
|
xoff = x - pScreen->x;
|
||||||
yoff = y - dixScreenOrigins[idx].y;
|
yoff = y - pScreen->y;
|
||||||
|
|
||||||
/* Adjust the root window's position in dixScreenOrigins */
|
/* Adjust the root window's position */
|
||||||
dixScreenOrigins[idx].x = dmxScreen->rootXOrigin;
|
pScreen->x = dmxScreen->rootXOrigin;
|
||||||
dixScreenOrigins[idx].y = dmxScreen->rootYOrigin;
|
pScreen->y = dmxScreen->rootYOrigin;
|
||||||
|
|
||||||
/* Recalculate the Xinerama regions and data structs */
|
/* Recalculate the Xinerama regions and data structs */
|
||||||
XineramaReinitData(pScreen);
|
XineramaReinitData(pScreen);
|
||||||
|
|
||||||
/* Adjust each of the root window's children */
|
/* Adjust each of the root window's children */
|
||||||
if (!idx) ReinitializeRootWindow(WindowTable[0], xoff, yoff);
|
if (!idx) ReinitializeRootWindow(screenInfo.screens[0]->root, xoff, yoff);
|
||||||
pChild = pRoot->firstChild;
|
pChild = pRoot->firstChild;
|
||||||
while (pChild) {
|
while (pChild) {
|
||||||
/* Adjust child window's position */
|
/* Adjust child window's position */
|
||||||
|
@ -634,7 +634,7 @@ int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs)
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
ScreenPtr pScreen = screenInfo.screens[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
WindowPtr pChild = WindowTable[i]->firstChild;
|
WindowPtr pChild = pScreen->root->firstChild;
|
||||||
while (pChild) {
|
while (pChild) {
|
||||||
/* Adjust child window's position */
|
/* Adjust child window's position */
|
||||||
pScreen->MoveWindow(pChild,
|
pScreen->MoveWindow(pChild,
|
||||||
|
@ -914,7 +914,7 @@ static void dmxBECreateResources(pointer value, XID id, RESTYPE type,
|
||||||
static void dmxBECreateWindowTree(int idx)
|
static void dmxBECreateWindowTree(int idx)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = screenInfo.screens[idx]->root;
|
||||||
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
|
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
|
@ -982,7 +982,7 @@ static void dmxBECreateWindowTree(int idx)
|
||||||
static void dmxForceExposures(int idx)
|
static void dmxForceExposures(int idx)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = screenInfo.screens[idx];
|
ScreenPtr pScreen = screenInfo.screens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = pScreen->root;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
|
@ -1510,7 +1510,7 @@ static void dmxBEDestroyScratchGCs(int scrnNum)
|
||||||
* destroy a window as well as all of it's children. */
|
* destroy a window as well as all of it's children. */
|
||||||
static void dmxBEDestroyWindowTree(int idx)
|
static void dmxBEDestroyWindowTree(int idx)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[idx];
|
WindowPtr pWin = screenInfo.screens[idx]->root;
|
||||||
WindowPtr pChild = pWin;
|
WindowPtr pChild = pWin;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -1497,9 +1497,7 @@ PanoramiX prefix.
|
||||||
<para>The Xinerama extension is registered by calling AddExtension().
|
<para>The Xinerama extension is registered by calling AddExtension().
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>A local per-screen array of data structures
|
<para>GC and Screen private
|
||||||
(panoramiXdataPtr[])
|
|
||||||
is allocated for each physical screen, and GC and Screen private
|
|
||||||
indexes are allocated, and both GC and Screen private areas are
|
indexes are allocated, and both GC and Screen private areas are
|
||||||
allocated for each physical screen. These hold Xinerama-specific
|
allocated for each physical screen. These hold Xinerama-specific
|
||||||
per-GC and per-Screen data. Each screen's CreateGC and CloseScreen
|
per-GC and per-Screen data. Each screen's CreateGC and CloseScreen
|
||||||
|
@ -1509,13 +1507,10 @@ PanoramiX prefix.
|
||||||
Xinerama windows, pixmaps and colormaps.
|
Xinerama windows, pixmaps and colormaps.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>A region (XineramaScreenRegions[i]) is initialized for each
|
<para>A region (PanoramiXScreenRegion) is
|
||||||
physical screen, and single region (PanoramiXScreenRegion) is
|
initialized to be the union of the screen regions.
|
||||||
initialized to be the union of the screen regions. The
|
The relative positioning information for the
|
||||||
panoramiXdataPtr[] array is also initialized with the size and
|
physical screens is taken from the ScreenRec x and y members, which
|
||||||
origin of each screen. The relative positioning information for the
|
|
||||||
physical screens is taken from the array
|
|
||||||
dixScreenOrigins[], which
|
|
||||||
the DDX layer must initialize in InitOutput(). The bounds of the
|
the DDX layer must initialize in InitOutput(). The bounds of the
|
||||||
combined screen is also calculated (PanoramiXPixWidth and
|
combined screen is also calculated (PanoramiXPixWidth and
|
||||||
PanoramiXPixHeight).
|
PanoramiXPixHeight).
|
||||||
|
|
|
@ -370,7 +370,7 @@ void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
|
||||||
Display *display = priv->display;
|
Display *display = priv->display;
|
||||||
int num;
|
int num;
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
int (*handler)(Display *, char *, char *);
|
XextErrorHandler handler;
|
||||||
|
|
||||||
if (!display && !(display = XOpenDisplay(dmxInput->name)))
|
if (!display && !(display = XOpenDisplay(dmxInput->name)))
|
||||||
return;
|
return;
|
||||||
|
@ -526,10 +526,9 @@ int dmxFindPointerScreen(int x, int y)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
if (x >= dixScreenOrigins[i].x
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
&& x < dixScreenOrigins[i].x + screenInfo.screens[i]->width
|
if (x >= pScreen->x && x < pScreen->x + pScreen->width &&
|
||||||
&& y >= dixScreenOrigins[i].y
|
y >= pScreen->y && y < pScreen->y + pScreen->height)
|
||||||
&& y < dixScreenOrigins[i].y + screenInfo.screens[i]->height)
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -204,7 +204,8 @@ static void dmxConsoleDrawWindows(pointer private)
|
||||||
XUnionRectWithRegion(&rect, whole, whole);
|
XUnionRectWithRegion(&rect, whole, whole);
|
||||||
|
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
WindowPtr pRoot = WindowTable[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
#if DMX_WINDOW_DEBUG
|
#if DMX_WINDOW_DEBUG
|
||||||
|
@ -227,10 +228,8 @@ static void dmxConsoleDrawWindows(pointer private)
|
||||||
pChild->overrideRedirect,
|
pChild->overrideRedirect,
|
||||||
REGION_NUM_RECTS(&pChild->clipList));
|
REGION_NUM_RECTS(&pChild->clipList));
|
||||||
#endif
|
#endif
|
||||||
rect.x = scalex(priv, pChild->drawable.x
|
rect.x = scalex(priv, pChild->drawable.x + pScreen->x);
|
||||||
+ dixScreenOrigins[i].x);
|
rect.y = scaley(priv, pChild->drawable.y + pScreen->y);
|
||||||
rect.y = scaley(priv, pChild->drawable.y
|
|
||||||
+ dixScreenOrigins[i].y);
|
|
||||||
rect.width = scalex(priv, pChild->drawable.width);
|
rect.width = scalex(priv, pChild->drawable.width);
|
||||||
rect.height = scaley(priv, pChild->drawable.height);
|
rect.height = scaley(priv, pChild->drawable.height);
|
||||||
XDrawRectangle(dpy, priv->pixmap, priv->gc,
|
XDrawRectangle(dpy, priv->pixmap, priv->gc,
|
||||||
|
@ -263,15 +262,15 @@ static void dmxConsoleDraw(myPrivate *priv, int updateCursor, int update)
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[i];
|
DMXScreenInfo *dmxScreen = &dmxScreens[i];
|
||||||
XFillRectangle(dpy, priv->pixmap,
|
XFillRectangle(dpy, priv->pixmap,
|
||||||
dmxScreen->beDisplay ? priv->gcRev : priv->gcDet,
|
dmxScreen->beDisplay ? priv->gcRev : priv->gcDet,
|
||||||
scalex(priv, dixScreenOrigins[i].x),
|
scalex(priv, screenInfo.screens[i]->x),
|
||||||
scaley(priv, dixScreenOrigins[i].y),
|
scaley(priv, screenInfo.screens[i]->y),
|
||||||
scalex(priv, screenInfo.screens[i]->width),
|
scalex(priv, screenInfo.screens[i]->width),
|
||||||
scaley(priv, screenInfo.screens[i]->height));
|
scaley(priv, screenInfo.screens[i]->height));
|
||||||
}
|
}
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
XDrawRectangle(dpy, priv->pixmap, priv->gc,
|
XDrawRectangle(dpy, priv->pixmap, priv->gc,
|
||||||
scalex(priv, dixScreenOrigins[i].x),
|
scalex(priv, screenInfo.screens[i]->x),
|
||||||
scaley(priv, dixScreenOrigins[i].y),
|
scaley(priv, screenInfo.screens[i]->y),
|
||||||
scalex(priv, screenInfo.screens[i]->width),
|
scalex(priv, screenInfo.screens[i]->width),
|
||||||
scaley(priv, screenInfo.screens[i]->height));
|
scaley(priv, screenInfo.screens[i]->height));
|
||||||
}
|
}
|
||||||
|
@ -671,11 +670,11 @@ static void dmxConsoleComputeWidthHeight(myPrivate *priv,
|
||||||
* possible by computing the visible
|
* possible by computing the visible
|
||||||
* bounding box. */
|
* bounding box. */
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
if (dixScreenOrigins[i].x+screenInfo.screens[i]->width > *width)
|
if (screenInfo.screens[i]->x+screenInfo.screens[i]->width > *width)
|
||||||
*width = dixScreenOrigins[i].x+screenInfo.screens[i]->width;
|
*width = screenInfo.screens[i]->x+screenInfo.screens[i]->width;
|
||||||
|
|
||||||
if (dixScreenOrigins[i].y+screenInfo.screens[i]->height > *height)
|
if (screenInfo.screens[i]->y+screenInfo.screens[i]->height > *height)
|
||||||
*height = dixScreenOrigins[i].y+screenInfo.screens[i]->height;
|
*height = screenInfo.screens[i]->y+screenInfo.screens[i]->height;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -570,7 +570,7 @@ static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (!noPanoramiXExtension && pWindow && pWindow->parent != WindowTable[0])
|
if (!noPanoramiXExtension && pWindow && pWindow->parent != screenInfo.screens[0]->root)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
#if DMX_WINDOW_DEBUG
|
#if DMX_WINDOW_DEBUG
|
||||||
|
@ -827,7 +827,7 @@ static void dmxPopulateLocal(DMXInputInfo *dmxInput, dmxArg a)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int dmxInputExtensionErrorHandler(Display *dsp, char *name, char *reason)
|
int dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name, _Xconst char *reason)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -839,7 +839,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
|
||||||
Display *display;
|
Display *display;
|
||||||
int num;
|
int num;
|
||||||
int i, j;
|
int i, j;
|
||||||
int (*handler)(Display *, char *, char *);
|
XextErrorHandler handler;
|
||||||
|
|
||||||
if (!(display = XOpenDisplay(dmxInput->name))) return;
|
if (!(display = XOpenDisplay(dmxInput->name))) return;
|
||||||
|
|
||||||
|
|
|
@ -276,8 +276,8 @@ extern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl *ctrl);
|
||||||
extern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
|
extern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
|
||||||
pointer ctrl, int unknown);
|
pointer ctrl, int unknown);
|
||||||
|
|
||||||
extern int dmxInputExtensionErrorHandler(Display *dsp, char *name,
|
extern int dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name,
|
||||||
char *reason);
|
_Xconst char *reason);
|
||||||
|
|
||||||
extern int dmxInputDetach(DMXInputInfo *dmxInput);
|
extern int dmxInputDetach(DMXInputInfo *dmxInput);
|
||||||
extern void dmxInputDetachAll(DMXScreenInfo *dmxScreen);
|
extern void dmxInputDetachAll(DMXScreenInfo *dmxScreen);
|
||||||
|
|
|
@ -95,7 +95,7 @@ KdOsFuncs *kdOsFuncs;
|
||||||
void
|
void
|
||||||
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable;
|
Bool WasViewable;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
|
@ -941,9 +941,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
|
||||||
pScreenPriv->card = card;
|
pScreenPriv->card = card;
|
||||||
pScreenPriv->bytesPerPixel = screen->fb.bitsPerPixel >> 3;
|
pScreenPriv->bytesPerPixel = screen->fb.bitsPerPixel >> 3;
|
||||||
pScreenPriv->dpmsState = KD_DPMS_NORMAL;
|
pScreenPriv->dpmsState = KD_DPMS_NORMAL;
|
||||||
#ifdef PANORAMIX
|
pScreen->x = screen->origin.x;
|
||||||
dixScreenOrigins[pScreen->myNum] = screen->origin;
|
pScreen->y = screen->origin.y;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!monitorResolution)
|
if (!monitorResolution)
|
||||||
monitorResolution = 75;
|
monitorResolution = 75;
|
||||||
|
|
|
@ -581,7 +581,7 @@ xf86InitOrigins(void)
|
||||||
{
|
{
|
||||||
unsigned long screensLeft, prevScreensLeft, mask;
|
unsigned long screensLeft, prevScreensLeft, mask;
|
||||||
screenLayoutPtr screen;
|
screenLayoutPtr screen;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen, refScreen;
|
||||||
int x1, x2, y1, y2, left, right, top, bottom;
|
int x1, x2, y1, y2, left, right, top, bottom;
|
||||||
int i, j, ref, minX, minY, min, max;
|
int i, j, ref, minX, minY, min, max;
|
||||||
xf86ScreenLayoutPtr pLayout;
|
xf86ScreenLayoutPtr pLayout;
|
||||||
|
@ -608,6 +608,7 @@ xf86InitOrigins(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pScreen = xf86Screens[i]->pScreen;
|
||||||
switch(screen->where) {
|
switch(screen->where) {
|
||||||
case PosObsolete:
|
case PosObsolete:
|
||||||
OldStyleConfig = TRUE;
|
OldStyleConfig = TRUE;
|
||||||
|
@ -620,7 +621,7 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pLayout->left = AddEdge(pLayout->left,
|
pLayout->left = AddEdge(pLayout->left,
|
||||||
0, xf86Screens[i]->pScreen->height,
|
0, pScreen->height,
|
||||||
xf86Screens[ref]->pScreen->width, 0, ref);
|
xf86Screens[ref]->pScreen->width, 0, ref);
|
||||||
}
|
}
|
||||||
if(screen->right) {
|
if(screen->right) {
|
||||||
|
@ -629,7 +630,6 @@ xf86InitOrigins(void)
|
||||||
ErrorF("Referenced uninitialized screen in Layout!\n");
|
ErrorF("Referenced uninitialized screen in Layout!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pScreen = xf86Screens[i]->pScreen;
|
|
||||||
pLayout->right = AddEdge(pLayout->right,
|
pLayout->right = AddEdge(pLayout->right,
|
||||||
0, pScreen->height, -pScreen->width, 0, ref);
|
0, pScreen->height, -pScreen->width, 0, ref);
|
||||||
}
|
}
|
||||||
|
@ -640,7 +640,7 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pLayout->up = AddEdge(pLayout->up,
|
pLayout->up = AddEdge(pLayout->up,
|
||||||
0, xf86Screens[i]->pScreen->width,
|
0, pScreen->width,
|
||||||
0, xf86Screens[ref]->pScreen->height, ref);
|
0, xf86Screens[ref]->pScreen->height, ref);
|
||||||
}
|
}
|
||||||
if(screen->bottom) {
|
if(screen->bottom) {
|
||||||
|
@ -649,7 +649,6 @@ xf86InitOrigins(void)
|
||||||
ErrorF("Referenced uninitialized screen in Layout!\n");
|
ErrorF("Referenced uninitialized screen in Layout!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pScreen = xf86Screens[i]->pScreen;
|
|
||||||
pLayout->down = AddEdge(pLayout->down,
|
pLayout->down = AddEdge(pLayout->down,
|
||||||
0, pScreen->width, 0, -pScreen->height, ref);
|
0, pScreen->width, 0, -pScreen->height, ref);
|
||||||
}
|
}
|
||||||
|
@ -658,8 +657,8 @@ xf86InitOrigins(void)
|
||||||
screen->x = screen->y = 0;
|
screen->x = screen->y = 0;
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case PosAbsolute:
|
case PosAbsolute:
|
||||||
dixScreenOrigins[i].x = screen->x;
|
pScreen->x = screen->x;
|
||||||
dixScreenOrigins[i].y = screen->y;
|
pScreen->y = screen->y;
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
case PosRelative:
|
case PosRelative:
|
||||||
|
@ -669,8 +668,9 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(screensLeft & (1 << ref)) break;
|
if(screensLeft & (1 << ref)) break;
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->x;
|
refScreen = xf86Screens[ref]->pScreen;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->y;
|
pScreen->x = refScreen->x + screen->x;
|
||||||
|
pScreen->y = refScreen->y + screen->y;
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
case PosRightOf:
|
case PosRightOf:
|
||||||
|
@ -680,10 +680,9 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(screensLeft & (1 << ref)) break;
|
if(screensLeft & (1 << ref)) break;
|
||||||
pScreen = xf86Screens[ref]->pScreen;
|
refScreen = xf86Screens[ref]->pScreen;
|
||||||
dixScreenOrigins[i].x =
|
pScreen->x = refScreen->x + refScreen->width;
|
||||||
dixScreenOrigins[ref].x + pScreen->width;
|
pScreen->y = refScreen->y;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y;
|
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
case PosLeftOf:
|
case PosLeftOf:
|
||||||
|
@ -693,10 +692,9 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(screensLeft & (1 << ref)) break;
|
if(screensLeft & (1 << ref)) break;
|
||||||
pScreen = xf86Screens[i]->pScreen;
|
refScreen = xf86Screens[ref]->pScreen;
|
||||||
dixScreenOrigins[i].x =
|
pScreen->x = refScreen->x - pScreen->width;
|
||||||
dixScreenOrigins[ref].x - pScreen->width;
|
pScreen->y = refScreen->y;
|
||||||
dixScreenOrigins[i].y = dixScreenOrigins[ref].y;
|
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
case PosBelow:
|
case PosBelow:
|
||||||
|
@ -706,10 +704,9 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(screensLeft & (1 << ref)) break;
|
if(screensLeft & (1 << ref)) break;
|
||||||
pScreen = xf86Screens[ref]->pScreen;
|
refScreen = xf86Screens[ref]->pScreen;
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x;
|
pScreen->x = refScreen->x;
|
||||||
dixScreenOrigins[i].y =
|
pScreen->y = refScreen->y + refScreen->height;
|
||||||
dixScreenOrigins[ref].y + pScreen->height;
|
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
case PosAbove:
|
case PosAbove:
|
||||||
|
@ -719,10 +716,9 @@ xf86InitOrigins(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(screensLeft & (1 << ref)) break;
|
if(screensLeft & (1 << ref)) break;
|
||||||
pScreen = xf86Screens[i]->pScreen;
|
refScreen = xf86Screens[ref]->pScreen;
|
||||||
dixScreenOrigins[i].x = dixScreenOrigins[ref].x;
|
pScreen->x = refScreen->x;
|
||||||
dixScreenOrigins[i].y =
|
pScreen->y = refScreen->y - pScreen->height;
|
||||||
dixScreenOrigins[ref].y - pScreen->height;
|
|
||||||
screensLeft &= ~(1 << i);
|
screensLeft &= ~(1 << i);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -741,7 +737,7 @@ xf86InitOrigins(void)
|
||||||
while(!((1 << i) & screensLeft)){ i++; }
|
while(!((1 << i) & screensLeft)){ i++; }
|
||||||
|
|
||||||
ref = xf86ConfigLayout.screens[i].refscreen->screennum;
|
ref = xf86ConfigLayout.screens[i].refscreen->screennum;
|
||||||
dixScreenOrigins[ref].x = dixScreenOrigins[ref].y = 0;
|
xf86Screens[ref]->pScreen->x = xf86Screens[ref]->pScreen->y = 0;
|
||||||
screensLeft &= ~(1 << ref);
|
screensLeft &= ~(1 << ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,20 +745,20 @@ xf86InitOrigins(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* justify the topmost and leftmost to (0,0) */
|
/* justify the topmost and leftmost to (0,0) */
|
||||||
minX = dixScreenOrigins[0].x;
|
minX = xf86Screens[0]->pScreen->x;
|
||||||
minY = dixScreenOrigins[0].y;
|
minY = xf86Screens[0]->pScreen->y;
|
||||||
|
|
||||||
for(i = 1; i < xf86NumScreens; i++) {
|
for(i = 1; i < xf86NumScreens; i++) {
|
||||||
if(dixScreenOrigins[i].x < minX)
|
if(xf86Screens[i]->pScreen->x < minX)
|
||||||
minX = dixScreenOrigins[i].x;
|
minX = xf86Screens[i]->pScreen->x;
|
||||||
if(dixScreenOrigins[i].y < minY)
|
if(xf86Screens[i]->pScreen->y < minY)
|
||||||
minY = dixScreenOrigins[i].y;
|
minY = xf86Screens[i]->pScreen->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minX || minY) {
|
if (minX || minY) {
|
||||||
for(i = 0; i < xf86NumScreens; i++) {
|
for(i = 0; i < xf86NumScreens; i++) {
|
||||||
dixScreenOrigins[i].x -= minX;
|
xf86Screens[i]->pScreen->x -= minX;
|
||||||
dixScreenOrigins[i].y -= minY;
|
xf86Screens[i]->pScreen->y -= minY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -775,18 +771,20 @@ xf86InitOrigins(void)
|
||||||
|
|
||||||
pScreen = xf86Screens[i]->pScreen;
|
pScreen = xf86Screens[i]->pScreen;
|
||||||
|
|
||||||
left = dixScreenOrigins[i].x;
|
left = pScreen->x;
|
||||||
right = left + pScreen->width;
|
right = left + pScreen->width;
|
||||||
top = dixScreenOrigins[i].y;
|
top = pScreen->y;
|
||||||
bottom = top + pScreen->height;
|
bottom = top + pScreen->height;
|
||||||
|
|
||||||
for(j = 0; j < xf86NumScreens; j++) {
|
for(j = 0; j < xf86NumScreens; j++) {
|
||||||
if(i == j) continue;
|
if(i == j) continue;
|
||||||
|
|
||||||
x1 = dixScreenOrigins[j].x;
|
refScreen = xf86Screens[j]->pScreen;
|
||||||
x2 = x1 + xf86Screens[j]->pScreen->width;
|
|
||||||
y1 = dixScreenOrigins[j].y;
|
x1 = refScreen->x;
|
||||||
y2 = y1 + xf86Screens[j]->pScreen->height;
|
x2 = x1 + refScreen->width;
|
||||||
|
y1 = refScreen->y;
|
||||||
|
y2 = y1 + refScreen->height;
|
||||||
|
|
||||||
if((bottom > y1) && (top < y2)) {
|
if((bottom > y1) && (top < y2)) {
|
||||||
min = y1 - top;
|
min = y1 - top;
|
||||||
|
@ -796,13 +794,13 @@ xf86InitOrigins(void)
|
||||||
|
|
||||||
if(((left - 1) >= x1) && ((left - 1) < x2))
|
if(((left - 1) >= x1) && ((left - 1) < x2))
|
||||||
pLayout->left = AddEdge(pLayout->left, min, max,
|
pLayout->left = AddEdge(pLayout->left, min, max,
|
||||||
dixScreenOrigins[i].x - dixScreenOrigins[j].x,
|
pScreen->x - refScreen->x,
|
||||||
dixScreenOrigins[i].y - dixScreenOrigins[j].y, j);
|
pScreen->y - refScreen->y, j);
|
||||||
|
|
||||||
if((right >= x1) && (right < x2))
|
if((right >= x1) && (right < x2))
|
||||||
pLayout->right = AddEdge(pLayout->right, min, max,
|
pLayout->right = AddEdge(pLayout->right, min, max,
|
||||||
dixScreenOrigins[i].x - dixScreenOrigins[j].x,
|
pScreen->x - refScreen->x,
|
||||||
dixScreenOrigins[i].y - dixScreenOrigins[j].y, j);
|
pScreen->y - refScreen->y, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -814,13 +812,13 @@ xf86InitOrigins(void)
|
||||||
|
|
||||||
if(((top - 1) >= y1) && ((top - 1) < y2))
|
if(((top - 1) >= y1) && ((top - 1) < y2))
|
||||||
pLayout->up = AddEdge(pLayout->up, min, max,
|
pLayout->up = AddEdge(pLayout->up, min, max,
|
||||||
dixScreenOrigins[i].x - dixScreenOrigins[j].x,
|
pScreen->x - refScreen->x,
|
||||||
dixScreenOrigins[i].y - dixScreenOrigins[j].y, j);
|
pScreen->y - refScreen->y, j);
|
||||||
|
|
||||||
if((bottom >= y1) && (bottom < y2))
|
if((bottom >= y1) && (bottom < y2))
|
||||||
pLayout->down = AddEdge(pLayout->down, min, max,
|
pLayout->down = AddEdge(pLayout->down, min, max,
|
||||||
dixScreenOrigins[i].x - dixScreenOrigins[j].x,
|
pScreen->x - refScreen->x,
|
||||||
dixScreenOrigins[i].y - dixScreenOrigins[j].y, j);
|
pScreen->y - refScreen->y, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen)
|
||||||
static void
|
static void
|
||||||
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
|
|
|
@ -159,7 +159,7 @@ xf86RandRSetMode (ScreenPtr pScreen,
|
||||||
int oldmmHeight = pScreen->mmHeight;
|
int oldmmHeight = pScreen->mmHeight;
|
||||||
int oldVirtualX = scrp->virtualX;
|
int oldVirtualX = scrp->virtualX;
|
||||||
int oldVirtualY = scrp->virtualY;
|
int oldVirtualY = scrp->virtualY;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
|
|
||||||
if (pRoot && scrp->vtSema)
|
if (pRoot && scrp->vtSema)
|
||||||
|
|
|
@ -1881,7 +1881,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
|
||||||
void
|
void
|
||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
||||||
{
|
{
|
||||||
DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
|
DrawablePtr root = &pScreen->root->drawable;
|
||||||
ChangeGCVal pval[2];
|
ChangeGCVal pval[2];
|
||||||
BoxPtr pbox = REGION_RECTS(clipboxes);
|
BoxPtr pbox = REGION_RECTS(clipboxes);
|
||||||
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
||||||
|
|
|
@ -347,7 +347,7 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
|
||||||
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
|
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
|
||||||
ev.state = state;
|
ev.state = state;
|
||||||
ev.timestamp = currentTime.milliseconds;
|
ev.timestamp = currentTime.milliseconds;
|
||||||
ev.root = WindowTable[pScreen->myNum]->drawable.id;
|
ev.root = pScreen->root->drawable.id;
|
||||||
ev.kind = kind;
|
ev.kind = kind;
|
||||||
ev.forced = forced;
|
ev.forced = forced;
|
||||||
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
|
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ DRIDriverClipNotify(ScreenPtr pScreen)
|
||||||
|
|
||||||
if (pDRIPriv->nrWindows > 0) {
|
if (pDRIPriv->nrWindows > 0) {
|
||||||
pDRIPriv->nrWalked = 0;
|
pDRIPriv->nrWalked = 0;
|
||||||
TraverseTree(WindowTable[pScreen->myNum], DRIDCNTreeTraversal,
|
TraverseTree(pScreen->root, DRIDCNTreeTraversal,
|
||||||
(pointer)pDRIWindows);
|
(pointer)pDRIWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -607,7 +607,7 @@ DRI2CanFlip(DrawablePtr pDraw)
|
||||||
if (pDraw->type == DRAWABLE_PIXMAP)
|
if (pDraw->type == DRAWABLE_PIXMAP)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
|
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
|
||||||
|
|
||||||
pWin = (WindowPtr) pDraw;
|
pWin = (WindowPtr) pDraw;
|
||||||
|
|
|
@ -517,7 +517,7 @@ xf86RandR12SetMode (ScreenPtr pScreen,
|
||||||
int oldHeight = pScreen->height;
|
int oldHeight = pScreen->height;
|
||||||
int oldmmWidth = pScreen->mmWidth;
|
int oldmmWidth = pScreen->mmWidth;
|
||||||
int oldmmHeight = pScreen->mmHeight;
|
int oldmmHeight = pScreen->mmHeight;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
DisplayModePtr currentMode = NULL;
|
DisplayModePtr currentMode = NULL;
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
PixmapPtr pspix = NULL;
|
PixmapPtr pspix = NULL;
|
||||||
|
@ -685,7 +685,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
||||||
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
||||||
Bool ret = FALSE;
|
Bool ret = FALSE;
|
||||||
int c;
|
int c;
|
||||||
|
@ -739,7 +739,7 @@ finish:
|
||||||
if (pRoot && pScrn->vtSema)
|
if (pRoot && pScrn->vtSema)
|
||||||
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
||||||
#if RANDR_12_INTERFACE
|
#if RANDR_12_INTERFACE
|
||||||
if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret)
|
if (xf86RandR12Key && pScreen->root && ret)
|
||||||
RRScreenSizeNotify (pScreen);
|
RRScreenSizeNotify (pScreen);
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -76,9 +76,9 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr scrn = crtc->scrn;
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
ScreenPtr screen = scrn->pScreen;
|
ScreenPtr screen = scrn->pScreen;
|
||||||
WindowPtr root = WindowTable[screen->myNum];
|
WindowPtr root = screen->root;
|
||||||
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
|
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
|
||||||
PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
|
PictFormatPtr format = compWindowFormat (screen->root);
|
||||||
int error;
|
int error;
|
||||||
PicturePtr src, dst;
|
PicturePtr src, dst;
|
||||||
int n = REGION_NUM_RECTS(region);
|
int n = REGION_NUM_RECTS(region);
|
||||||
|
|
|
@ -47,7 +47,7 @@ XAACopyWindow(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pwinRoot = WindowTable[pScreen->myNum];
|
pwinRoot = pScreen->root;
|
||||||
|
|
||||||
REGION_NULL(pScreen, &rgnDst);
|
REGION_NULL(pScreen, &rgnDst);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ XAACopyWindow8_32(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pwinRoot = WindowTable[pScreen->myNum];
|
pwinRoot = pScreen->root;
|
||||||
|
|
||||||
if(doUnderlay)
|
if(doUnderlay)
|
||||||
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
|
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
|
||||||
|
|
|
@ -324,7 +324,7 @@ XAAOverCopyWindow(
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int i, nbox, dx, dy;
|
int i, nbox, dx, dy;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
|
|
||||||
|
|
||||||
if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) {
|
if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) {
|
||||||
|
|
|
@ -140,10 +140,8 @@ AppleWMSetScreenOrigin(
|
||||||
{
|
{
|
||||||
int32_t data[2];
|
int32_t data[2];
|
||||||
|
|
||||||
data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x
|
data[0] = pWin->drawable.pScreen->x + darwinMainScreenX;
|
||||||
+ darwinMainScreenX);
|
data[1] = pWin->drawable.pScreen->y + darwinMainScreenY;
|
||||||
data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y
|
|
||||||
+ darwinMainScreenY);
|
|
||||||
|
|
||||||
dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(),
|
dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(),
|
||||||
XA_INTEGER, 32, PropModeReplace, 2, data, TRUE);
|
XA_INTEGER, 32, PropModeReplace, 2, data, TRUE);
|
||||||
|
|
|
@ -262,8 +262,8 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
dixScreenOrigins[index].x = dfb->x;
|
pScreen->x = dfb->x;
|
||||||
dixScreenOrigins[index].y = dfb->y;
|
pScreen->y = dfb->y;
|
||||||
|
|
||||||
/* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n",
|
/* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n",
|
||||||
index, dfb->width, dfb->height, dfb->x, dfb->y); */
|
index, dfb->width, dfb->height, dfb->x, dfb->y); */
|
||||||
|
@ -526,16 +526,16 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
|
||||||
{
|
{
|
||||||
int i, left, top;
|
int i, left, top;
|
||||||
|
|
||||||
left = dixScreenOrigins[0].x;
|
left = pScreenInfo->screens[0]->x;
|
||||||
top = dixScreenOrigins[0].y;
|
top = pScreenInfo->screens[0]->y;
|
||||||
|
|
||||||
/* Find leftmost screen. If there's a tie, take the topmost of the two. */
|
/* Find leftmost screen. If there's a tie, take the topmost of the two. */
|
||||||
for (i = 1; i < pScreenInfo->numScreens; i++) {
|
for (i = 1; i < pScreenInfo->numScreens; i++) {
|
||||||
if (dixScreenOrigins[i].x < left ||
|
if (pScreenInfo->screens[i]->x < left ||
|
||||||
(dixScreenOrigins[i].x == left && dixScreenOrigins[i].y < top))
|
(pScreenInfo->screens[i]->x == left && pScreenInfo->screens[i]->y < top))
|
||||||
{
|
{
|
||||||
left = dixScreenOrigins[i].x;
|
left = pScreenInfo->screens[i]->x;
|
||||||
top = dixScreenOrigins[i].y;
|
top = pScreenInfo->screens[i]->y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,10 +551,10 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
|
||||||
|
|
||||||
if (darwinMainScreenX != 0 || darwinMainScreenY != 0) {
|
if (darwinMainScreenX != 0 || darwinMainScreenY != 0) {
|
||||||
for (i = 0; i < pScreenInfo->numScreens; i++) {
|
for (i = 0; i < pScreenInfo->numScreens; i++) {
|
||||||
dixScreenOrigins[i].x -= darwinMainScreenX;
|
pScreenInfo->screens[i]->x -= darwinMainScreenX;
|
||||||
dixScreenOrigins[i].y -= darwinMainScreenY;
|
pScreenInfo->screens[i]->y -= darwinMainScreenY;
|
||||||
DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n",
|
DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n",
|
||||||
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y);
|
i, pScreenInfo->screens[i]->x, pScreenInfo->screens[i]->y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -793,7 +793,7 @@ void AbortDDX( void )
|
||||||
void
|
void
|
||||||
xf86SetRootClip (ScreenPtr pScreen, int enable)
|
xf86SetRootClip (ScreenPtr pScreen, int enable)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = TRUE;
|
Bool anyMarked = TRUE;
|
||||||
|
|
|
@ -377,8 +377,8 @@ static void DarwinPrepareValuators(DeviceIntPtr pDev, int *valuators, ScreenPtr
|
||||||
float pointer_x, float pointer_y,
|
float pointer_x, float pointer_y,
|
||||||
float pressure, float tilt_x, float tilt_y) {
|
float pressure, float tilt_x, float tilt_y) {
|
||||||
/* Fix offset between darwin and X screens */
|
/* Fix offset between darwin and X screens */
|
||||||
pointer_x -= darwinMainScreenX + dixScreenOrigins[screen->myNum].x;
|
pointer_x -= darwinMainScreenX + screen->x;
|
||||||
pointer_y -= darwinMainScreenY + dixScreenOrigins[screen->myNum].y;
|
pointer_y -= darwinMainScreenY + screen->y;
|
||||||
|
|
||||||
if(pointer_x < 0.0)
|
if(pointer_x < 0.0)
|
||||||
pointer_x = 0.0;
|
pointer_x = 0.0;
|
||||||
|
|
|
@ -255,9 +255,9 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
/* screen dimensions */
|
/* screen dimensions */
|
||||||
rep.width = pseudoramiXScreens[stuff->screen].w;
|
rep.width = pseudoramiXScreens[stuff->screen].w;
|
||||||
// was panoramiXdataPtr[stuff->screen].width;
|
// was screenInfo.screens[stuff->screen]->width;
|
||||||
rep.height = pseudoramiXScreens[stuff->screen].h;
|
rep.height = pseudoramiXScreens[stuff->screen].h;
|
||||||
// was panoramiXdataPtr[stuff->screen].height;
|
// was screenInfo.screens[stuff->screen]->height;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps (&rep.sequenceNumber, n);
|
||||||
swapl (&rep.length, n);
|
swapl (&rep.length, n);
|
||||||
|
|
|
@ -259,8 +259,8 @@ void QuartzUpdateScreens(void) {
|
||||||
PseudoramiXResetScreens();
|
PseudoramiXResetScreens();
|
||||||
quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height);
|
quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height);
|
||||||
|
|
||||||
dixScreenOrigins[pScreen->myNum].x = x;
|
pScreen->x = x;
|
||||||
dixScreenOrigins[pScreen->myNum].y = y;
|
pScreen->y = y;
|
||||||
pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width);
|
pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width);
|
||||||
pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height);
|
pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height);
|
||||||
pScreen->width = width;
|
pScreen->width = width;
|
||||||
|
@ -269,14 +269,14 @@ void QuartzUpdateScreens(void) {
|
||||||
DarwinAdjustScreenOrigins(&screenInfo);
|
DarwinAdjustScreenOrigins(&screenInfo);
|
||||||
quartzProcs->UpdateScreen(pScreen);
|
quartzProcs->UpdateScreen(pScreen);
|
||||||
|
|
||||||
/* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins,
|
/* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y,
|
||||||
* so use it rather than x/y
|
* so use it rather than x/y
|
||||||
*/
|
*/
|
||||||
sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX;
|
sx = pScreen->x + darwinMainScreenX;
|
||||||
sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
|
sy = pScreen->y + darwinMainScreenY;
|
||||||
|
|
||||||
/* Adjust the root window. */
|
/* Adjust the root window. */
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
AppleWMSetScreenOrigin(pRoot);
|
AppleWMSetScreenOrigin(pRoot);
|
||||||
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
||||||
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||||
|
@ -292,7 +292,7 @@ void QuartzUpdateScreens(void) {
|
||||||
inputInfo.pointer->spriteInfo->sprite->physLimits = bounds;
|
inputInfo.pointer->spriteInfo->sprite->physLimits = bounds;
|
||||||
inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds;
|
inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds;
|
||||||
|
|
||||||
DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y);
|
DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y);
|
||||||
|
|
||||||
/* Send an event for the root reconfigure */
|
/* Send an event for the root reconfigure */
|
||||||
e.u.u.type = ConfigureNotify;
|
e.u.u.type = ConfigureNotify;
|
||||||
|
|
|
@ -296,8 +296,8 @@ QuartzWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
int sx, sy;
|
int sx, sy;
|
||||||
|
|
||||||
sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX;
|
sx = pScreen->x + darwinMainScreenX;
|
||||||
sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
|
sy = pScreen->y + darwinMainScreenY;
|
||||||
|
|
||||||
CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y));
|
CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y));
|
||||||
}
|
}
|
||||||
|
|
|
@ -576,7 +576,7 @@ xprHideWindows(Bool hide)
|
||||||
|
|
||||||
for (screen = 0; screen < screenInfo.numScreens; screen++) {
|
for (screen = 0; screen < screenInfo.numScreens; screen++) {
|
||||||
RootlessFrameID prevWid = NULL;
|
RootlessFrameID prevWid = NULL;
|
||||||
pRoot = WindowTable[screenInfo.screens[screen]->myNum];
|
pRoot = screenInfo.screens[screen]->root;
|
||||||
|
|
||||||
for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
|
for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
|
||||||
RootlessWindowRec *winRec = WINREC(pWin);
|
RootlessWindowRec *winRec = WINREC(pWin);
|
||||||
|
|
|
@ -397,7 +397,7 @@ xprUpdateScreen(ScreenPtr pScreen)
|
||||||
rootlessGlobalOffsetX = darwinMainScreenX;
|
rootlessGlobalOffsetX = darwinMainScreenX;
|
||||||
rootlessGlobalOffsetY = darwinMainScreenY;
|
rootlessGlobalOffsetY = darwinMainScreenY;
|
||||||
|
|
||||||
AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]);
|
AppleWMSetScreenOrigin(pScreen->root);
|
||||||
|
|
||||||
RootlessRepositionWindows(pScreen);
|
RootlessRepositionWindows(pScreen);
|
||||||
RootlessUpdateScreenPixmap(pScreen);
|
RootlessUpdateScreenPixmap(pScreen);
|
||||||
|
@ -416,7 +416,7 @@ xprInitInput(int argc, char **argv)
|
||||||
rootlessGlobalOffsetY = darwinMainScreenY;
|
rootlessGlobalOffsetY = darwinMainScreenY;
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
AppleWMSetScreenOrigin(WindowTable[i]);
|
AppleWMSetScreenOrigin(screenInfo.screens[i]->root);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -262,7 +262,7 @@ winRestoreModeKeyStates (void)
|
||||||
|
|
||||||
/* Only process events if the rootwindow is mapped. The keyboard events
|
/* Only process events if the rootwindow is mapped. The keyboard events
|
||||||
* will cause segfaults otherwise */
|
* will cause segfaults otherwise */
|
||||||
if (WindowTable && WindowTable[0] && WindowTable[0]->mapped == FALSE)
|
if (screenInfo.screens[0]->root && screenInfo.screens[0]->root->mapped == FALSE)
|
||||||
processEvents = FALSE;
|
processEvents = FALSE;
|
||||||
|
|
||||||
/* Force to process all pending events in the mi event queue */
|
/* Force to process all pending events in the mi event queue */
|
||||||
|
|
|
@ -243,11 +243,11 @@ winScreenInit (int index,
|
||||||
Note the screen origin in a normalized coordinate space where (0,0) is at the top left
|
Note the screen origin in a normalized coordinate space where (0,0) is at the top left
|
||||||
of the native virtual desktop area
|
of the native virtual desktop area
|
||||||
*/
|
*/
|
||||||
dixScreenOrigins[index].x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN);
|
pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN);
|
||||||
dixScreenOrigins[index].y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
|
pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
|
||||||
|
|
||||||
ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n",
|
ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n",
|
||||||
index, dixScreenOrigins[index].x, dixScreenOrigins[index].y);
|
index, pScreen->x, pScreen->y);
|
||||||
|
|
||||||
#if CYGDEBUG || YES
|
#if CYGDEBUG || YES
|
||||||
winDebug ("winScreenInit - returning\n");
|
winDebug ("winScreenInit - returning\n");
|
||||||
|
|
|
@ -407,7 +407,7 @@ void
|
||||||
winMWExtWMRestackWindows (ScreenPtr pScreen)
|
winMWExtWMRestackWindows (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
winScreenPriv(pScreen);
|
winScreenPriv(pScreen);
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pWin = NULL;
|
WindowPtr pWin = NULL;
|
||||||
WindowPtr pWinPrev = NULL;
|
WindowPtr pWinPrev = NULL;
|
||||||
win32RootlessWindowPtr pRLWin = NULL;
|
win32RootlessWindowPtr pRLWin = NULL;
|
||||||
|
|
|
@ -144,7 +144,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get a pointer to the root window */
|
/* Get a pointer to the root window */
|
||||||
pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
|
pwinRoot = pWin->drawable.pScreen->root;
|
||||||
|
|
||||||
/* Create a region for the destination */
|
/* Create a region for the destination */
|
||||||
prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
|
prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
|
||||||
|
|
|
@ -19,12 +19,9 @@ extern _X_EXPORT char *defaultFontPath;
|
||||||
extern _X_EXPORT int monitorResolution;
|
extern _X_EXPORT int monitorResolution;
|
||||||
extern _X_EXPORT int defaultColorVisualClass;
|
extern _X_EXPORT int defaultColorVisualClass;
|
||||||
|
|
||||||
extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
|
|
||||||
extern _X_EXPORT int GrabInProgress;
|
extern _X_EXPORT int GrabInProgress;
|
||||||
extern _X_EXPORT Bool noTestExtensions;
|
extern _X_EXPORT Bool noTestExtensions;
|
||||||
|
|
||||||
extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS];
|
|
||||||
|
|
||||||
extern _X_EXPORT char *ConnectionInfo;
|
extern _X_EXPORT char *ConnectionInfo;
|
||||||
|
|
||||||
#ifdef DPMSExtension
|
#ifdef DPMSExtension
|
||||||
|
|
|
@ -82,6 +82,16 @@ typedef struct _Depth {
|
||||||
VisualID *vids; /* block of visual ids for this depth */
|
VisualID *vids; /* block of visual ids for this depth */
|
||||||
} DepthRec;
|
} DepthRec;
|
||||||
|
|
||||||
|
typedef struct _ScreenSaverStuff {
|
||||||
|
WindowPtr pWindow;
|
||||||
|
XID wid;
|
||||||
|
char blanked;
|
||||||
|
Bool (*ExternalScreenSaver)(
|
||||||
|
ScreenPtr /*pScreen*/,
|
||||||
|
int /*xstate*/,
|
||||||
|
Bool /*force*/);
|
||||||
|
} ScreenSaverStuffRec;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There is a typedef for each screen function pointer so that code that
|
* There is a typedef for each screen function pointer so that code that
|
||||||
|
@ -446,7 +456,7 @@ typedef void (* DeviceCursorCleanupProcPtr)(
|
||||||
typedef struct _Screen {
|
typedef struct _Screen {
|
||||||
int myNum; /* index of this instance in Screens[] */
|
int myNum; /* index of this instance in Screens[] */
|
||||||
ATOM id;
|
ATOM id;
|
||||||
short width, height;
|
short x, y, width, height;
|
||||||
short mmWidth, mmHeight;
|
short mmWidth, mmHeight;
|
||||||
short numDepths;
|
short numDepths;
|
||||||
unsigned char rootDepth;
|
unsigned char rootDepth;
|
||||||
|
@ -468,6 +478,8 @@ typedef struct _Screen {
|
||||||
pointer devPrivate;
|
pointer devPrivate;
|
||||||
short numVisuals;
|
short numVisuals;
|
||||||
VisualPtr visuals;
|
VisualPtr visuals;
|
||||||
|
WindowPtr root;
|
||||||
|
ScreenSaverStuffRec screensaver;
|
||||||
|
|
||||||
/* Random screen procedures */
|
/* Random screen procedures */
|
||||||
|
|
||||||
|
|
|
@ -204,24 +204,15 @@ extern _X_EXPORT Mask DontPropagateMasks[];
|
||||||
|
|
||||||
#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
|
#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
|
||||||
|
|
||||||
typedef struct _ScreenSaverStuff {
|
typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
|
||||||
WindowPtr pWindow;
|
|
||||||
XID wid;
|
|
||||||
char blanked;
|
|
||||||
Bool (*ExternalScreenSaver)(
|
|
||||||
ScreenPtr /*pScreen*/,
|
|
||||||
int /*xstate*/,
|
|
||||||
Bool /*force*/);
|
|
||||||
} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
|
|
||||||
|
|
||||||
#define SCREEN_IS_BLANKED 0
|
#define SCREEN_IS_BLANKED 0
|
||||||
#define SCREEN_ISNT_SAVED 1
|
#define SCREEN_ISNT_SAVED 1
|
||||||
#define SCREEN_IS_TILED 2
|
#define SCREEN_IS_TILED 2
|
||||||
#define SCREEN_IS_BLACK 3
|
#define SCREEN_IS_BLACK 3
|
||||||
|
|
||||||
#define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow)
|
#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow)
|
||||||
|
|
||||||
extern _X_EXPORT int screenIsSaved;
|
extern _X_EXPORT int screenIsSaved;
|
||||||
extern _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
|
|
||||||
|
|
||||||
#endif /* WINDOWSTRUCT_H */
|
#endif /* WINDOWSTRUCT_H */
|
||||||
|
|
276
mi/midispcur.c
276
mi/midispcur.c
|
@ -66,12 +66,9 @@ static DevPrivateKey miDCSpriteKey = miDCSpriteKeyIndex;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GCPtr pSourceGC, pMaskGC;
|
GCPtr pSourceGC, pMaskGC;
|
||||||
GCPtr pSaveGC, pRestoreGC;
|
GCPtr pSaveGC, pRestoreGC;
|
||||||
GCPtr pMoveGC;
|
PixmapPtr pSave;
|
||||||
GCPtr pPixSourceGC, pPixMaskGC;
|
|
||||||
PixmapPtr pSave, pTemp;
|
|
||||||
#ifdef ARGB_CURSOR
|
#ifdef ARGB_CURSOR
|
||||||
PicturePtr pRootPicture;
|
PicturePtr pRootPicture;
|
||||||
PicturePtr pTempPicture;
|
|
||||||
#endif
|
#endif
|
||||||
} miDCBufferRec, *miDCBufferPtr;
|
} miDCBufferRec, *miDCBufferPtr;
|
||||||
|
|
||||||
|
@ -408,7 +405,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
||||||
}
|
}
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||||
miDCScreenKey);
|
miDCScreenKey);
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
pBuffer = MIDCBUFFER(pDev, pScreen);
|
||||||
|
|
||||||
#ifdef ARGB_CURSOR
|
#ifdef ARGB_CURSOR
|
||||||
|
@ -451,7 +448,7 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
pBuffer = MIDCBUFFER(pDev, pScreen);
|
||||||
|
|
||||||
pSave = pBuffer->pSave;
|
pSave = pBuffer->pSave;
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
|
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
|
||||||
{
|
{
|
||||||
if (pSave)
|
if (pSave)
|
||||||
|
@ -485,7 +482,7 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
pBuffer = MIDCBUFFER(pDev, pScreen);
|
||||||
pSave = pBuffer->pSave;
|
pSave = pBuffer->pSave;
|
||||||
|
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
if (!pSave)
|
if (!pSave)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -497,244 +494,11 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
|
||||||
miDCChangeSave (DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
||||||
int x, int y, int w, int h, int dx, int dy)
|
|
||||||
{
|
|
||||||
miDCScreenPtr pScreenPriv;
|
|
||||||
miDCBufferPtr pBuffer;
|
|
||||||
PixmapPtr pSave;
|
|
||||||
WindowPtr pWin;
|
|
||||||
GCPtr pGC;
|
|
||||||
int sourcex, sourcey, destx, desty, copyw, copyh;
|
|
||||||
|
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
|
||||||
miDCScreenKey);
|
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
|
||||||
|
|
||||||
pSave = pBuffer->pSave;
|
|
||||||
pWin = WindowTable[pScreen->myNum];
|
|
||||||
/*
|
|
||||||
* restore the bits which are about to get trashed
|
|
||||||
*/
|
|
||||||
if (!pSave)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
pGC = pBuffer->pRestoreGC;
|
|
||||||
if (pWin->drawable.serialNumber != pGC->serialNumber)
|
|
||||||
ValidateGC ((DrawablePtr) pWin, pGC);
|
|
||||||
/*
|
|
||||||
* copy the old bits to the screen.
|
|
||||||
*/
|
|
||||||
if (dy > 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
|
|
||||||
0, h - dy, w, dy, x + dx, y + h);
|
|
||||||
}
|
|
||||||
else if (dy < 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
|
|
||||||
0, 0, w, -dy, x + dx, y + dy);
|
|
||||||
}
|
|
||||||
if (dy >= 0)
|
|
||||||
{
|
|
||||||
desty = y + dy;
|
|
||||||
sourcey = 0;
|
|
||||||
copyh = h - dy;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
desty = y;
|
|
||||||
sourcey = - dy;
|
|
||||||
copyh = h + dy;
|
|
||||||
}
|
|
||||||
if (dx > 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
|
|
||||||
w - dx, sourcey, dx, copyh, x + w, desty);
|
|
||||||
}
|
|
||||||
else if (dx < 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
|
|
||||||
0, sourcey, -dx, copyh, x + dx, desty);
|
|
||||||
}
|
|
||||||
|
|
||||||
pGC = pBuffer->pSaveGC;
|
|
||||||
if (pSave->drawable.serialNumber != pGC->serialNumber)
|
|
||||||
ValidateGC ((DrawablePtr) pSave, pGC);
|
|
||||||
/*
|
|
||||||
* move the bits that are still valid within the pixmap
|
|
||||||
*/
|
|
||||||
if (dx >= 0)
|
|
||||||
{
|
|
||||||
sourcex = 0;
|
|
||||||
destx = dx;
|
|
||||||
copyw = w - dx;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
destx = 0;
|
|
||||||
sourcex = - dx;
|
|
||||||
copyw = w + dx;
|
|
||||||
}
|
|
||||||
if (dy >= 0)
|
|
||||||
{
|
|
||||||
sourcey = 0;
|
|
||||||
desty = dy;
|
|
||||||
copyh = h - dy;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
desty = 0;
|
|
||||||
sourcey = -dy;
|
|
||||||
copyh = h + dy;
|
|
||||||
}
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pSave, pGC,
|
|
||||||
sourcex, sourcey, copyw, copyh, destx, desty);
|
|
||||||
/*
|
|
||||||
* copy the new bits from the screen into the remaining areas of the
|
|
||||||
* pixmap
|
|
||||||
*/
|
|
||||||
if (dy > 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
|
|
||||||
x, y, w, dy, 0, 0);
|
|
||||||
}
|
|
||||||
else if (dy < 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
|
|
||||||
x, y + h + dy, w, -dy, 0, h + dy);
|
|
||||||
}
|
|
||||||
if (dy >= 0)
|
|
||||||
{
|
|
||||||
desty = dy;
|
|
||||||
sourcey = y + dy;
|
|
||||||
copyh = h - dy;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
desty = 0;
|
|
||||||
sourcey = y;
|
|
||||||
copyh = h + dy;
|
|
||||||
}
|
|
||||||
if (dx > 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
|
|
||||||
x, sourcey, dx, copyh, 0, desty);
|
|
||||||
}
|
|
||||||
else if (dx < 0)
|
|
||||||
{
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
|
|
||||||
x + w + dx, sourcey, -dx, copyh, w + dx, desty);
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
|
||||||
miDCMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
|
||||||
int x, int y, int w, int h, int dx, int dy,
|
|
||||||
unsigned long source, unsigned long mask)
|
|
||||||
{
|
|
||||||
miDCCursorPtr pPriv;
|
|
||||||
miDCScreenPtr pScreenPriv;
|
|
||||||
miDCBufferPtr pBuffer;
|
|
||||||
int status;
|
|
||||||
WindowPtr pWin;
|
|
||||||
GCPtr pGC;
|
|
||||||
XID gcval = FALSE;
|
|
||||||
PixmapPtr pTemp;
|
|
||||||
|
|
||||||
pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates,
|
|
||||||
CursorScreenKey(pScreen));
|
|
||||||
if (!pPriv)
|
|
||||||
{
|
|
||||||
pPriv = miDCRealize(pScreen, pCursor);
|
|
||||||
if (!pPriv)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
|
||||||
miDCScreenKey);
|
|
||||||
pWin = WindowTable[pScreen->myNum];
|
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
|
||||||
|
|
||||||
pTemp = pBuffer->pTemp;
|
|
||||||
if (!pTemp ||
|
|
||||||
pTemp->drawable.width != pBuffer->pSave->drawable.width ||
|
|
||||||
pTemp->drawable.height != pBuffer->pSave->drawable.height)
|
|
||||||
{
|
|
||||||
if (pTemp)
|
|
||||||
(*pScreen->DestroyPixmap) (pTemp);
|
|
||||||
#ifdef ARGB_CURSOR
|
|
||||||
if (pBuffer->pTempPicture)
|
|
||||||
{
|
|
||||||
FreePicture (pBuffer->pTempPicture, 0);
|
|
||||||
pBuffer->pTempPicture = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
pBuffer->pTemp = pTemp = (*pScreen->CreatePixmap)
|
|
||||||
(pScreen, w, h, pBuffer->pSave->drawable.depth, 0);
|
|
||||||
if (!pTemp)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if (!pBuffer->pMoveGC)
|
|
||||||
{
|
|
||||||
pBuffer->pMoveGC = CreateGC ((DrawablePtr)pTemp,
|
|
||||||
GCGraphicsExposures, &gcval, &status, (XID)0, serverClient);
|
|
||||||
if (!pBuffer->pMoveGC)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* copy the saved area to a temporary pixmap
|
|
||||||
*/
|
|
||||||
pGC = pBuffer->pMoveGC;
|
|
||||||
if (pGC->serialNumber != pTemp->drawable.serialNumber)
|
|
||||||
ValidateGC ((DrawablePtr) pTemp, pGC);
|
|
||||||
(*pGC->ops->CopyArea)((DrawablePtr)pBuffer->pSave,
|
|
||||||
(DrawablePtr)pTemp, pGC, 0, 0, w, h, 0, 0);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* draw the cursor in the temporary pixmap
|
|
||||||
*/
|
|
||||||
#ifdef ARGB_CURSOR
|
|
||||||
if (pPriv->pPicture)
|
|
||||||
{
|
|
||||||
if (!EnsurePicture(pBuffer->pTempPicture, &pTemp->drawable, pWin))
|
|
||||||
return FALSE;
|
|
||||||
CompositePicture (PictOpOver,
|
|
||||||
pPriv->pPicture,
|
|
||||||
NULL,
|
|
||||||
pBuffer->pTempPicture,
|
|
||||||
0, 0, 0, 0,
|
|
||||||
dx, dy,
|
|
||||||
pCursor->bits->width,
|
|
||||||
pCursor->bits->height);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
miDCPutBits ((DrawablePtr)pTemp, pPriv,
|
|
||||||
pBuffer->pPixSourceGC, pBuffer->pPixMaskGC,
|
|
||||||
dx, dy, pCursor->bits->width, pCursor->bits->height,
|
|
||||||
source, mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
pGC = pBuffer->pRestoreGC;
|
|
||||||
if (pWin->drawable.serialNumber != pGC->serialNumber)
|
|
||||||
ValidateGC ((DrawablePtr) pWin, pGC);
|
|
||||||
|
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pTemp, (DrawablePtr) pWin,
|
|
||||||
pGC,
|
|
||||||
0, 0, w, h, x, y);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
miDCBufferPtr pBuffer;
|
miDCBufferPtr pBuffer;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
XID gcval = FALSE;
|
|
||||||
int status;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!DevHasCursor(pDev))
|
if (!DevHasCursor(pDev))
|
||||||
|
@ -749,7 +513,7 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer);
|
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer);
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
|
|
||||||
pBuffer->pSourceGC = miDCMakeGC(pWin);
|
pBuffer->pSourceGC = miDCMakeGC(pWin);
|
||||||
if (!pBuffer->pSourceGC)
|
if (!pBuffer->pSourceGC)
|
||||||
|
@ -767,28 +531,12 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
if (!pBuffer->pRestoreGC)
|
if (!pBuffer->pRestoreGC)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
pBuffer->pMoveGC = CreateGC ((DrawablePtr)pWin,
|
|
||||||
GCGraphicsExposures, &gcval, &status, (XID)0, serverClient);
|
|
||||||
if (!pBuffer->pMoveGC)
|
|
||||||
goto failure;
|
|
||||||
|
|
||||||
pBuffer->pPixSourceGC = CreateGC ((DrawablePtr)pWin,
|
|
||||||
GCGraphicsExposures, &gcval, &status, (XID)0, serverClient);
|
|
||||||
if (!pBuffer->pPixSourceGC)
|
|
||||||
goto failure;
|
|
||||||
|
|
||||||
pBuffer->pPixMaskGC = CreateGC ((DrawablePtr)pWin,
|
|
||||||
GCGraphicsExposures, &gcval, &status, (XID)0, serverClient);
|
|
||||||
if (!pBuffer->pPixMaskGC)
|
|
||||||
goto failure;
|
|
||||||
|
|
||||||
#ifdef ARGB_CURSOR
|
#ifdef ARGB_CURSOR
|
||||||
pBuffer->pRootPicture = NULL;
|
pBuffer->pRootPicture = NULL;
|
||||||
pBuffer->pTempPicture = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// these get (re)allocated lazily depending on the cursor size
|
/* (re)allocated lazily depending on the cursor size */
|
||||||
pBuffer->pSave = pBuffer->pTemp = NULL;
|
pBuffer->pSave = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -820,12 +568,14 @@ miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
if (pBuffer->pMaskGC) FreeGC(pBuffer->pMaskGC, (GContext) 0);
|
if (pBuffer->pMaskGC) FreeGC(pBuffer->pMaskGC, (GContext) 0);
|
||||||
if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0);
|
if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0);
|
||||||
if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0);
|
if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0);
|
||||||
if (pBuffer->pMoveGC) FreeGC(pBuffer->pMoveGC, (GContext) 0);
|
|
||||||
if (pBuffer->pPixSourceGC) FreeGC(pBuffer->pPixSourceGC, (GContext) 0);
|
#ifdef ARGB_CURSOR
|
||||||
if (pBuffer->pPixMaskGC) FreeGC(pBuffer->pPixMaskGC, (GContext) 0);
|
/* If a pRootPicture was allocated for a root window, it
|
||||||
|
* is freed when that root window is destroyed, so don't
|
||||||
|
* free it again here. */
|
||||||
|
#endif
|
||||||
|
|
||||||
if (pBuffer->pSave) (*pScreen->DestroyPixmap)(pBuffer->pSave);
|
if (pBuffer->pSave) (*pScreen->DestroyPixmap)(pBuffer->pSave);
|
||||||
if (pBuffer->pTemp) (*pScreen->DestroyPixmap)(pBuffer->pTemp);
|
|
||||||
|
|
||||||
free(pBuffer);
|
free(pBuffer);
|
||||||
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, NULL);
|
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, NULL);
|
||||||
|
|
|
@ -424,9 +424,9 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
|
||||||
XID realWin = 0;
|
XID realWin = 0;
|
||||||
|
|
||||||
if(!pWin->parent) {
|
if(!pWin->parent) {
|
||||||
x = panoramiXdataPtr[scrnum].x;
|
x = screenInfo.screens[scrnum]->x;
|
||||||
y = panoramiXdataPtr[scrnum].y;
|
y = screenInfo.screens[scrnum]->y;
|
||||||
pWin = WindowTable[0];
|
pWin = screenInfo.screens[0]->root;
|
||||||
realWin = pWin->drawable.id;
|
realWin = pWin->drawable.id;
|
||||||
} else if (scrnum) {
|
} else if (scrnum) {
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
|
|
|
@ -306,7 +306,7 @@ miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
|
||||||
{
|
{
|
||||||
if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) {
|
if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) {
|
||||||
/* This could probably be more optimal */
|
/* This could probably be more optimal */
|
||||||
RebuildTree(WindowTable[pWin->drawable.pScreen->myNum]->firstChild);
|
RebuildTree(pWin->drawable.pScreen->root->firstChild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1610,7 +1610,7 @@ miOverlayChangeBorderWidth(
|
||||||
void
|
void
|
||||||
miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
|
miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
|
||||||
{
|
{
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
|
||||||
|
|
||||||
MARK_UNDERLAY(pRoot);
|
MARK_UNDERLAY(pRoot);
|
||||||
|
@ -1741,7 +1741,7 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
|
||||||
pregWin = REGION_CREATE(pScreen, NullBox, 1);
|
pregWin = REGION_CREATE(pScreen, NullBox, 1);
|
||||||
freeTmpClip = TRUE;
|
freeTmpClip = TRUE;
|
||||||
if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) ||
|
if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) ||
|
||||||
!HasSaverWindow (pScreen->myNum))
|
!HasSaverWindow (pScreen))
|
||||||
{
|
{
|
||||||
REGION_INTERSECT(pScreen,pregWin,&pTree->borderClip,&pWin->winSize);
|
REGION_INTERSECT(pScreen,pregWin,&pTree->borderClip,&pWin->winSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -798,73 +798,9 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
miSpriteFindColors (pPointer, pScreen);
|
miSpriteFindColors (pPointer, pScreen);
|
||||||
}
|
}
|
||||||
if (pPointer->isUp) {
|
if (pPointer->isUp) {
|
||||||
#if 0
|
/* TODO: reimplement flicker-free MoveCursor */
|
||||||
/* FIXME: Disabled for MPX, should be rewritten */
|
SPRITE_DEBUG (("SetCursor remove %d\n", pDev->id));
|
||||||
int sx, sy;
|
miSpriteRemoveCursor (pDev, pScreen);
|
||||||
/*
|
|
||||||
* check to see if the old saved region
|
|
||||||
* encloses the new sprite, in which case we use
|
|
||||||
* the flicker-free MoveCursor primitive.
|
|
||||||
*/
|
|
||||||
sx = pointer->x - (int)pCursor->bits->xhot;
|
|
||||||
sy = pointer->y - (int)pCursor->bits->yhot;
|
|
||||||
if (sx + (int) pCursor->bits->width >= pointer->saved.x1 &&
|
|
||||||
sx < pointer->saved.x2 &&
|
|
||||||
sy + (int) pCursor->bits->height >= pointer->saved.y1 &&
|
|
||||||
sy < pointer->saved.y2 &&
|
|
||||||
(int) pCursor->bits->width + (2 * SPRITE_PAD) ==
|
|
||||||
pointer->saved.x2 - pointer->saved.x1 &&
|
|
||||||
(int) pCursor->bits->height + (2 * SPRITE_PAD) ==
|
|
||||||
pointer->saved.y2 - pointer->saved.y1
|
|
||||||
)
|
|
||||||
{
|
|
||||||
DamageDrawInternal (pScreen, TRUE);
|
|
||||||
miSpriteIsDown(pCursorInfo);
|
|
||||||
if (!(sx >= pointer->saved.x1 &&
|
|
||||||
sx + (int)pCursor->bits->width < pointer->saved.x2
|
|
||||||
&& sy >= pointer->saved.y1 &&
|
|
||||||
sy + (int)pCursor->bits->height <
|
|
||||||
pointer->saved.y2))
|
|
||||||
{
|
|
||||||
int oldx1, oldy1, dx, dy;
|
|
||||||
|
|
||||||
oldx1 = pointer->saved.x1;
|
|
||||||
oldy1 = pointer->saved.y1;
|
|
||||||
dx = oldx1 - (sx - SPRITE_PAD);
|
|
||||||
dy = oldy1 - (sy - SPRITE_PAD);
|
|
||||||
pointer->saved.x1 -= dx;
|
|
||||||
pointer->saved.y1 -= dy;
|
|
||||||
pointer->saved.x2 -= dx;
|
|
||||||
pointer->saved.y2 -= dy;
|
|
||||||
(void) miDCChangeSave(pScreen,
|
|
||||||
pointer->saved.x1,
|
|
||||||
pointer->saved.y1,
|
|
||||||
pointer->saved.x2 -
|
|
||||||
pointer->saved.x1,
|
|
||||||
pointer->saved.y2 -
|
|
||||||
pointer->saved.y1,
|
|
||||||
dx, dy);
|
|
||||||
}
|
|
||||||
(void) miDCMoveCursor(pScreen, pCursor,
|
|
||||||
pointer->saved.x1,
|
|
||||||
pointer->saved.y1,
|
|
||||||
pointer->saved.x2 -
|
|
||||||
pointer->saved.x1,
|
|
||||||
pointer->saved.y2 -
|
|
||||||
pointer->saved.y1,
|
|
||||||
sx - pointer->saved.x1,
|
|
||||||
sy - pointer->saved.y1,
|
|
||||||
pointer->colors[SOURCE_COLOR].pixel,
|
|
||||||
pointer->colors[MASK_COLOR].pixel);
|
|
||||||
miSpriteIsUp(pCursorInfo);
|
|
||||||
DamageDrawInternal (pScreen, FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
SPRITE_DEBUG (("SetCursor remove %d\n", pDev->id));
|
|
||||||
miSpriteRemoveCursor (pDev, pScreen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pPointer->isUp && pPointer->pCursor)
|
if (!pPointer->isUp && pPointer->pCursor)
|
||||||
|
|
|
@ -46,12 +46,5 @@ extern Bool miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
int x, int y, int w, int h);
|
int x, int y, int w, int h);
|
||||||
extern Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
extern Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
int x, int y, int w, int h);
|
int x, int y, int w, int h);
|
||||||
extern Bool miDCMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
||||||
CursorPtr pCursor, int x, int y,
|
|
||||||
int w, int h, int dx, int dy,
|
|
||||||
unsigned long source, unsigned long mask);
|
|
||||||
extern Bool miDCChangeSave(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
||||||
int x, int y, int w, int h,
|
|
||||||
int dx, int dy);
|
|
||||||
extern Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
|
extern Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
|
||||||
extern void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
|
extern void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
|
||||||
|
|
|
@ -447,7 +447,7 @@ RootlessRedisplay(WindowPtr pWindow)
|
||||||
void
|
void
|
||||||
RootlessRepositionWindows(ScreenPtr pScreen)
|
RootlessRepositionWindows(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr root = WindowTable[pScreen->myNum];
|
WindowPtr root = pScreen->root;
|
||||||
WindowPtr win;
|
WindowPtr win;
|
||||||
|
|
||||||
if (root != NULL) {
|
if (root != NULL) {
|
||||||
|
@ -468,7 +468,7 @@ RootlessRepositionWindows(ScreenPtr pScreen)
|
||||||
void
|
void
|
||||||
RootlessRedisplayScreen(ScreenPtr pScreen)
|
RootlessRedisplayScreen(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr root = WindowTable[pScreen->myNum];
|
WindowPtr root = pScreen->root;
|
||||||
|
|
||||||
if (root != NULL) {
|
if (root != NULL) {
|
||||||
WindowPtr win;
|
WindowPtr win;
|
||||||
|
|
|
@ -213,7 +213,7 @@ extern RegionRec rootlessHugeRoot;
|
||||||
|
|
||||||
// Returns TRUE if this window is a root window
|
// Returns TRUE if this window is a root window
|
||||||
#define IsRoot(pWin) \
|
#define IsRoot(pWin) \
|
||||||
((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum])
|
((pWin) == (pWin)->drawable.pScreen->root)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -493,7 +493,7 @@ static void expose_1 (WindowPtr pWin) {
|
||||||
void
|
void
|
||||||
RootlessScreenExpose (ScreenPtr pScreen)
|
RootlessScreenExpose (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
expose_1 (WindowTable[pScreen->myNum]);
|
expose_1 (pScreen->root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ extern Bool no_configure_window;
|
||||||
|
|
||||||
#ifdef ROOTLESS_GLOBAL_COORDS
|
#ifdef ROOTLESS_GLOBAL_COORDS
|
||||||
#define SCREEN_TO_GLOBAL_X \
|
#define SCREEN_TO_GLOBAL_X \
|
||||||
(dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX)
|
(pScreen->x + rootlessGlobalOffsetX)
|
||||||
#define SCREEN_TO_GLOBAL_Y \
|
#define SCREEN_TO_GLOBAL_Y \
|
||||||
(dixScreenOrigins[pScreen->myNum].y + rootlessGlobalOffsetY)
|
(pScreen->y + rootlessGlobalOffsetY)
|
||||||
#else
|
#else
|
||||||
#define SCREEN_TO_GLOBAL_X 0
|
#define SCREEN_TO_GLOBAL_X 0
|
||||||
#define SCREEN_TO_GLOBAL_Y 0
|
#define SCREEN_TO_GLOBAL_Y 0
|
||||||
|
@ -109,8 +109,8 @@ void RootlessNativeWindowMoved (WindowPtr pWin) {
|
||||||
|
|
||||||
if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return;
|
if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return;
|
||||||
|
|
||||||
sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX;
|
sx = pWin->drawable.pScreen->x + darwinMainScreenX;
|
||||||
sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
|
sy = pWin->drawable.pScreen->y + darwinMainScreenY;
|
||||||
|
|
||||||
/* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
|
/* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
|
||||||
vlist[0] = (INT16) bounds.x1 - sx;
|
vlist[0] = (INT16) bounds.x1 - sx;
|
||||||
|
@ -1517,7 +1517,7 @@ RootlessOrderAllWindows (void)
|
||||||
RL_DEBUG_MSG("RootlessOrderAllWindows() ");
|
RL_DEBUG_MSG("RootlessOrderAllWindows() ");
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
if (screenInfo.screens[i] == NULL) continue;
|
if (screenInfo.screens[i] == NULL) continue;
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
if (pWin == NULL) continue;
|
if (pWin == NULL) continue;
|
||||||
|
|
||||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
|
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
|
||||||
|
@ -1533,7 +1533,7 @@ void
|
||||||
RootlessEnableRoot (ScreenPtr pScreen)
|
RootlessEnableRoot (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr pRoot;
|
WindowPtr pRoot;
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
|
|
||||||
RootlessEnsureFrame (pRoot);
|
RootlessEnsureFrame (pRoot);
|
||||||
(*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE);
|
(*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE);
|
||||||
|
@ -1546,7 +1546,7 @@ RootlessDisableRoot (ScreenPtr pScreen)
|
||||||
WindowPtr pRoot;
|
WindowPtr pRoot;
|
||||||
RootlessWindowRec *winRec;
|
RootlessWindowRec *winRec;
|
||||||
|
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
winRec = WINREC (pRoot);
|
winRec = WINREC (pRoot);
|
||||||
|
|
||||||
if (NULL == winRec)
|
if (NULL == winRec)
|
||||||
|
@ -1572,8 +1572,10 @@ RootlessHideAllWindows (void)
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
pWin = WindowTable[i];
|
if (pScreen == NULL)
|
||||||
if (pScreen == NULL || pWin == NULL)
|
continue;
|
||||||
|
pWin = pScreen->root;
|
||||||
|
if (pWin == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
||||||
|
@ -1609,8 +1611,10 @@ RootlessShowAllWindows (void)
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
pWin = WindowTable[i];
|
if (pScreen == NULL)
|
||||||
if (pScreen == NULL || pWin == NULL)
|
continue;
|
||||||
|
pWin = pScreen->root;
|
||||||
|
if (pWin == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
||||||
|
|
|
@ -73,7 +73,7 @@ RREditConnectionInfo (ScreenPtr pScreen)
|
||||||
void
|
void
|
||||||
RRSendConfigNotify (ScreenPtr pScreen)
|
RRSendConfigNotify (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
|
||||||
event.u.u.type = ConfigureNotify;
|
event.u.u.type = ConfigureNotify;
|
||||||
|
@ -97,7 +97,7 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
|
||||||
rrScrPriv (pScreen);
|
rrScrPriv (pScreen);
|
||||||
xRRScreenChangeNotifyEvent se;
|
xRRScreenChangeNotifyEvent se;
|
||||||
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
|
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
|
|
||||||
se.type = RRScreenChangeNotify + RREventBase;
|
se.type = RRScreenChangeNotify + RREventBase;
|
||||||
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
|
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
|
||||||
|
@ -620,7 +620,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
rep.setOfRotations = RR_Rotate_0;
|
rep.setOfRotations = RR_Rotate_0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
|
rep.root = pWin->drawable.pScreen->root->drawable.id;
|
||||||
rep.timestamp = currentTime.milliseconds;
|
rep.timestamp = currentTime.milliseconds;
|
||||||
rep.configTimestamp = currentTime.milliseconds;
|
rep.configTimestamp = currentTime.milliseconds;
|
||||||
rep.nSizes = 0;
|
rep.nSizes = 0;
|
||||||
|
@ -649,7 +649,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
rep.setOfRotations = output->crtc->rotations;
|
rep.setOfRotations = output->crtc->rotations;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
|
rep.root = pWin->drawable.pScreen->root->drawable.id;
|
||||||
rep.timestamp = pScrPriv->lastSetTime.milliseconds;
|
rep.timestamp = pScrPriv->lastSetTime.milliseconds;
|
||||||
rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
||||||
rep.rotation = output->crtc->rotation;
|
rep.rotation = output->crtc->rotation;
|
||||||
|
@ -961,7 +961,7 @@ sendReply:
|
||||||
|
|
||||||
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
|
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
|
||||||
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
||||||
rep.root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
|
rep.root = pDraw->pScreen->root->drawable.id;
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
|
|
|
@ -216,7 +216,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
|
|
@ -43,6 +43,7 @@ and Jim Haggerty of Metheus.
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "eventconvert.h"
|
#include "eventconvert.h"
|
||||||
|
#include "scrnintstr.h"
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -755,11 +756,11 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP,
|
||||||
int scr = XineramaGetCursorScreen(inputInfo.pointer);
|
int scr = XineramaGetCursorScreen(inputInfo.pointer);
|
||||||
memcpy(&shiftedEvent, pev, sizeof(xEvent));
|
memcpy(&shiftedEvent, pev, sizeof(xEvent));
|
||||||
shiftedEvent.u.keyButtonPointer.rootX +=
|
shiftedEvent.u.keyButtonPointer.rootX +=
|
||||||
panoramiXdataPtr[scr].x -
|
screenInfo.screens[scr]->x -
|
||||||
panoramiXdataPtr[0].x;
|
screenInfo.screens[0]->x;
|
||||||
shiftedEvent.u.keyButtonPointer.rootY +=
|
shiftedEvent.u.keyButtonPointer.rootY +=
|
||||||
panoramiXdataPtr[scr].y -
|
screenInfo.screens[scr]->y -
|
||||||
panoramiXdataPtr[0].y;
|
screenInfo.screens[0]->y;
|
||||||
pEvToRecord = &shiftedEvent;
|
pEvToRecord = &shiftedEvent;
|
||||||
}
|
}
|
||||||
#endif /* PANORAMIX */
|
#endif /* PANORAMIX */
|
||||||
|
|
|
@ -2681,7 +2681,7 @@ PanoramiXRenderCreatePicture (ClientPtr client)
|
||||||
newPict->info[0].id = stuff->pid;
|
newPict->info[0].id = stuff->pid;
|
||||||
|
|
||||||
if (refDraw->type == XRT_WINDOW &&
|
if (refDraw->type == XRT_WINDOW &&
|
||||||
stuff->drawable == WindowTable[0]->drawable.id)
|
stuff->drawable == screenInfo.screens[0]->root->drawable.id)
|
||||||
{
|
{
|
||||||
newPict->u.pict.root = TRUE;
|
newPict->u.pict.root = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2832,22 +2832,22 @@ PanoramiXRenderComposite (ClientPtr client)
|
||||||
stuff->src = src->info[j].id;
|
stuff->src = src->info[j].id;
|
||||||
if (src->u.pict.root)
|
if (src->u.pict.root)
|
||||||
{
|
{
|
||||||
stuff->xSrc = orig.xSrc - panoramiXdataPtr[j].x;
|
stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x;
|
||||||
stuff->ySrc = orig.ySrc - panoramiXdataPtr[j].y;
|
stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
stuff->dst = dst->info[j].id;
|
stuff->dst = dst->info[j].id;
|
||||||
if (dst->u.pict.root)
|
if (dst->u.pict.root)
|
||||||
{
|
{
|
||||||
stuff->xDst = orig.xDst - panoramiXdataPtr[j].x;
|
stuff->xDst = orig.xDst - screenInfo.screens[j]->x;
|
||||||
stuff->yDst = orig.yDst - panoramiXdataPtr[j].y;
|
stuff->yDst = orig.yDst - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
if (msk)
|
if (msk)
|
||||||
{
|
{
|
||||||
stuff->mask = msk->info[j].id;
|
stuff->mask = msk->info[j].id;
|
||||||
if (msk->u.pict.root)
|
if (msk->u.pict.root)
|
||||||
{
|
{
|
||||||
stuff->xMask = orig.xMask - panoramiXdataPtr[j].x;
|
stuff->xMask = orig.xMask - screenInfo.screens[j]->x;
|
||||||
stuff->yMask = orig.yMask - panoramiXdataPtr[j].y;
|
stuff->yMask = orig.yMask - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
|
result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
|
||||||
|
@ -2881,14 +2881,14 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
|
||||||
stuff->src = src->info[j].id;
|
stuff->src = src->info[j].id;
|
||||||
if (src->u.pict.root)
|
if (src->u.pict.root)
|
||||||
{
|
{
|
||||||
stuff->xSrc = xSrc - panoramiXdataPtr[j].x;
|
stuff->xSrc = xSrc - screenInfo.screens[j]->x;
|
||||||
stuff->ySrc = ySrc - panoramiXdataPtr[j].y;
|
stuff->ySrc = ySrc - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
stuff->dst = dst->info[j].id;
|
stuff->dst = dst->info[j].id;
|
||||||
if (dst->u.pict.root)
|
if (dst->u.pict.root)
|
||||||
{
|
{
|
||||||
elt->deltax = origElt.deltax - panoramiXdataPtr[j].x;
|
elt->deltax = origElt.deltax - screenInfo.screens[j]->x;
|
||||||
elt->deltay = origElt.deltay - panoramiXdataPtr[j].y;
|
elt->deltay = origElt.deltay - screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
|
result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
@ -2918,8 +2918,8 @@ PanoramiXRenderFillRectangles (ClientPtr client)
|
||||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||||
if (dst->u.pict.root)
|
if (dst->u.pict.root)
|
||||||
{
|
{
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xRectangle *rects = (xRectangle *) (stuff + 1);
|
xRectangle *rects = (xRectangle *) (stuff + 1);
|
||||||
|
@ -2966,8 +2966,8 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||||
if (dst->u.pict.root) {
|
if (dst->u.pict.root) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
|
xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
|
||||||
|
@ -3026,8 +3026,8 @@ PanoramiXRenderTriangles(ClientPtr client)
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||||
if (dst->u.pict.root) {
|
if (dst->u.pict.root) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xTriangle *tri = (xTriangle *) (stuff + 1);
|
xTriangle *tri = (xTriangle *) (stuff + 1);
|
||||||
|
@ -3082,8 +3082,8 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||||
if (dst->u.pict.root) {
|
if (dst->u.pict.root) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
|
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
|
||||||
|
@ -3134,8 +3134,8 @@ PanoramiXRenderTriFan(ClientPtr client)
|
||||||
FOR_NSCREENS_FORWARD(j) {
|
FOR_NSCREENS_FORWARD(j) {
|
||||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||||
if (dst->u.pict.root) {
|
if (dst->u.pict.root) {
|
||||||
int x_off = panoramiXdataPtr[j].x;
|
int x_off = screenInfo.screens[j]->x;
|
||||||
int y_off = panoramiXdataPtr[j].y;
|
int y_off = screenInfo.screens[j]->y;
|
||||||
|
|
||||||
if(x_off || y_off) {
|
if(x_off || y_off) {
|
||||||
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
|
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
|
||||||
|
@ -3188,8 +3188,8 @@ PanoramiXRenderAddTraps (ClientPtr client)
|
||||||
|
|
||||||
if (picture->u.pict.root)
|
if (picture->u.pict.root)
|
||||||
{
|
{
|
||||||
stuff->xOff = x_off + panoramiXdataPtr[j].x;
|
stuff->xOff = x_off + screenInfo.screens[j]->x;
|
||||||
stuff->yOff = y_off + panoramiXdataPtr[j].y;
|
stuff->yOff = y_off + screenInfo.screens[j]->y;
|
||||||
}
|
}
|
||||||
result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
|
result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
|
||||||
if(result != Success) break;
|
if(result != Success) break;
|
||||||
|
|
|
@ -690,7 +690,7 @@ ReplaceCursor (CursorPtr pCursor,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
|
/* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
|
||||||
WindowHasNewCursor (WindowTable[0]);
|
WindowHasNewCursor (screenInfo.screens[0]->root);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
|
|
@ -43,6 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include "property.h"
|
#include "property.h"
|
||||||
|
#include "scrnintstr.h"
|
||||||
#define XKBSRV_NEED_FILE_FUNCS
|
#define XKBSRV_NEED_FILE_FUNCS
|
||||||
#include <xkbsrv.h>
|
#include <xkbsrv.h>
|
||||||
#include "xkbgeom.h"
|
#include "xkbgeom.h"
|
||||||
|
@ -210,7 +211,7 @@ char * pval;
|
||||||
ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
|
ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
|
||||||
out,len);
|
out,len);
|
||||||
}
|
}
|
||||||
dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
|
dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8,
|
||||||
PropModeReplace, len, pval, TRUE);
|
PropModeReplace, len, pval, TRUE);
|
||||||
free(pval);
|
free(pval);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user