Move each screen's screensaver data into ScreenRec.
Most references to the savedScreenInfo array already had the corresponding screen pointer handy, which meant they usually looked like "savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
This commit is contained in:
parent
5030540d6c
commit
80b5d3a326
|
@ -836,13 +836,14 @@ PanoramiXConsolidate(void)
|
||||||
saver->type = XRT_WINDOW;
|
saver->type = XRT_WINDOW;
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
for (i = 0; i < PanoramiXNumScreens; i++) {
|
||||||
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
root->info[i].id = WindowTable[i]->drawable.id;
|
root->info[i].id = WindowTable[i]->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);
|
||||||
|
|
|
@ -130,7 +130,7 @@ int PanoramiXCreateWindow(ClientPtr client)
|
||||||
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 == WindowTable[0]->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;
|
||||||
|
@ -329,7 +329,7 @@ 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 == WindowTable[0]->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;
|
||||||
|
@ -476,7 +476,7 @@ int PanoramiXConfigureWindow(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pWin->parent && ((pWin->parent == WindowTable[0]) ||
|
if(pWin->parent && ((pWin->parent == WindowTable[0]) ||
|
||||||
(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;
|
||||||
|
@ -563,7 +563,7 @@ int PanoramiXGetGeometry(ClientPtr client)
|
||||||
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 == WindowTable[0]) ||
|
||||||
(pWin->parent->drawable.id == savedScreenInfo[0].wid))
|
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
rep.x += panoramiXdataPtr[0].x;
|
rep.x += panoramiXdataPtr[0].x;
|
||||||
rep.y += panoramiXdataPtr[0].y;
|
rep.y += panoramiXdataPtr[0].y;
|
||||||
|
@ -597,7 +597,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
|
||||||
rep.child = None;
|
rep.child = None;
|
||||||
|
|
||||||
if((pWin == WindowTable[0]) ||
|
if((pWin == WindowTable[0]) ||
|
||||||
(pWin->drawable.id == savedScreenInfo[0].wid))
|
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
x = stuff->srcX - panoramiXdataPtr[0].x;
|
x = stuff->srcX - panoramiXdataPtr[0].x;
|
||||||
y = stuff->srcY - panoramiXdataPtr[0].y;
|
y = stuff->srcY - panoramiXdataPtr[0].y;
|
||||||
|
@ -635,7 +635,7 @@ 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 == WindowTable[0]) ||
|
||||||
(pDst->drawable.id == savedScreenInfo[0].wid))
|
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
rep.dstX += panoramiXdataPtr[0].x;
|
rep.dstX += panoramiXdataPtr[0].x;
|
||||||
rep.dstY += panoramiXdataPtr[0].y;
|
rep.dstY += panoramiXdataPtr[0].y;
|
||||||
|
|
12
Xext/saver.c
12
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
|
||||||
ev.state = state;
|
ev.state = state;
|
||||||
ev.timestamp = currentTime.milliseconds;
|
ev.timestamp = currentTime.milliseconds;
|
||||||
ev.root = WindowTable[pScreen->myNum]->drawable.id;
|
ev.root = WindowTable[pScreen->myNum]->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;
|
||||||
|
@ -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 ();
|
||||||
|
|
|
@ -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;
|
||||||
|
|
71
dix/window.c
71
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 | \
|
||||||
|
@ -363,9 +361,9 @@ 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;
|
WindowTable[pScreen->myNum] = pWin;
|
||||||
|
@ -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);
|
||||||
|
@ -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,8 +3248,9 @@ SaveScreens(int on, int mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
TileScreenSaver(int i, int kind)
|
TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
{
|
{
|
||||||
|
int i = pScreen->myNum;
|
||||||
int j;
|
int j;
|
||||||
int result;
|
int result;
|
||||||
XID attributes[3];
|
XID attributes[3];
|
||||||
|
@ -3330,12 +3327,12 @@ TileScreenSaver(int i, int kind)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pWin = savedScreenInfo[i].pWindow =
|
pWin = pScreen->screensaver.pWindow =
|
||||||
CreateWindow(savedScreenInfo[i].wid,
|
CreateWindow(pScreen->screensaver.wid,
|
||||||
WindowTable[i],
|
WindowTable[i],
|
||||||
-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 (WindowTable[i]), &result);
|
||||||
|
|
||||||
|
@ -3346,7 +3343,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)
|
||||||
|
|
|
@ -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
|
||||||
|
@ -468,6 +478,7 @@ typedef struct _Screen {
|
||||||
pointer devPrivate;
|
pointer devPrivate;
|
||||||
short numVisuals;
|
short numVisuals;
|
||||||
VisualPtr visuals;
|
VisualPtr visuals;
|
||||||
|
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 */
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue