Commit 60be452c authored by Eamon Walsh's avatar Eamon Walsh Committed by Eamon Walsh

xace: restore the old SaveScreens function and introduce new API, since the

old version is called from drivers...
parent a95bb52b
......@@ -468,8 +468,8 @@ ScreenSaverFreeAttr (value, id)
pPriv->attr = NULL;
if (pPriv->hasWindow)
{
SaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
SaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive);
dixSaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
dixSaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive);
}
CheckScreenPrivate (pScreen);
return TRUE;
......
......@@ -459,7 +459,7 @@ ProcXTestFakeInput(client)
break;
}
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
ev->u.keyButtonPointer.time = currentTime.milliseconds;
(*dev->public.processInputProc)(ev, dev, nev);
return client->noClientException;
......
......@@ -3582,7 +3582,7 @@ int ProcForceScreenSaver(ClientPtr client)
client->errorValue = stuff->mode;
return BadValue;
}
rc = SaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode);
rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode);
if (rc != Success)
return rc;
return client->noClientException;
......
......@@ -425,7 +425,7 @@ main(int argc, char *argv[], char *envp[])
for (i = 0; i < screenInfo.numScreens; i++)
InitRootWindow(WindowTable[i]);
DefineInitialRootWindow(WindowTable[0]);
SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
......@@ -446,7 +446,7 @@ main(int argc, char *argv[], char *envp[])
/* Now free up whatever must be freed */
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
FreeScreenSaverTimer();
CloseDownExtensions();
......
......@@ -3337,7 +3337,7 @@ static void DrawLogo(
#endif
_X_EXPORT int
SaveScreens(ClientPtr client, int on, int mode)
dixSaveScreens(ClientPtr client, int on, int mode)
{
int rc, i, what, type;
......@@ -3455,6 +3455,12 @@ SaveScreens(ClientPtr client, int on, int mode)
return Success;
}
_X_EXPORT int
SaveScreens(int on, int mode)
{
return dixSaveScreens(serverClient, on, mode);
}
static Bool
TileScreenSaver(int i, int kind)
{
......
......@@ -276,7 +276,7 @@ void ProcessInputEvents(void) {
while (darwinEventQueue.head != darwinEventQueue.tail)
{
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
e = &darwinEventQueue.events[darwinEventQueue.head];
xe = e->event;
......
......@@ -175,7 +175,7 @@ void dmxDPMSTerm(DMXScreenInfo *dmxScreen)
void dmxDPMSWakeup(void)
{
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
#ifdef DPMSExtension
if (DPMSPowerLevel) DPMSSet(serverClient, 0);
#endif
......
......@@ -153,7 +153,7 @@ DPMSSet(ClientPtr client, int level)
return Success;
if (level != DPMSModeOn) {
rc = SaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
if (rc != Success)
return rc;
}
......
......@@ -906,7 +906,7 @@ xf86VTSwitch()
(*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
}
}
SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
while (pInfo) {
......@@ -970,7 +970,7 @@ xf86VTSwitch()
}
/* Turn screen saver off when switching back */
SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
while (pInfo) {
......
......@@ -116,7 +116,7 @@ resume(pmEvent event, Bool undo)
if (xf86Screens[i]->EnableDisableFBAccess)
(*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
}
SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
while (pInfo) {
EnableDevice(pInfo->dev);
......
......@@ -319,6 +319,7 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(NotClippedByChildren)
SYMFUNC(ResizeChildrenWinSize)
SYMFUNC(SaveScreens)
SYMFUNC(dixSaveScreens)
SYMFUNC(SendVisibilityNotify)
SYMFUNC(SetWinSize)
SYMFUNC(SetBorderSize)
......
......@@ -204,11 +204,15 @@ extern RegionPtr NotClippedByChildren(
extern void SendVisibilityNotify(
WindowPtr /*pWin*/);
extern int SaveScreens(
extern int dixSaveScreens(
ClientPtr client,
int on,
int mode);
extern int SaveScreens(
int on,
int mode);
extern WindowPtr FindWindowWithOptional(
WindowPtr /*w*/);
......
......@@ -200,7 +200,7 @@ mieqProcessInputEvents(void)
while (miEventQueue.head != miEventQueue.tail) {
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
#ifdef DPMSExtension
else if (DPMSPowerLevel != DPMSModeOn)
SetScreenSaverTimer();
......
......@@ -647,7 +647,7 @@ ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg)
}
ResetOsBuffers(); /* not ideal, but better than nothing */
SaveScreens(serverClient, SCREEN_SAVER_ON, ScreenSaverActive);
dixSaveScreens(serverClient, SCREEN_SAVER_ON, ScreenSaverActive);
if (ScreenSaverInterval > 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment