aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c149
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c123
2 files changed, 0 insertions, 272 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 329a8cbcb..ad9ce771f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -978,155 +978,6 @@ ProcFreePixmap(register ClientPtr client)
}
}
-
-int
-ProcSetScreenSaver (register ClientPtr client)
-{
- int blankingOption, exposureOption;
- REQUEST(xSetScreenSaverReq);
-
- REQUEST_SIZE_MATCH(xSetScreenSaverReq);
- blankingOption = stuff->preferBlank;
- if ((blankingOption != DontPreferBlanking) &&
- (blankingOption != PreferBlanking) &&
- (blankingOption != DefaultBlanking))
- {
- client->errorValue = blankingOption;
- return BadValue;
- }
- exposureOption = stuff->allowExpose;
- if ((exposureOption != DontAllowExposures) &&
- (exposureOption != AllowExposures) &&
- (exposureOption != DefaultExposures))
- {
- client->errorValue = exposureOption;
- return BadValue;
- }
- if (stuff->timeout < -1)
- {
- client->errorValue = stuff->timeout;
- return BadValue;
- }
- if (stuff->interval < -1)
- {
- client->errorValue = stuff->interval;
- return BadValue;
- }
-
-#ifdef NXAGENT_SERVER
- /*
- * The NX agent uses the screen saver procedure
- * to monitor the user activities and launch its
- * handlers (like timeout feature), so we can't
- * always allow the clients to change our values.
- */
-
- #ifdef TEST
- fprintf(stderr, "ProcSetScreenSaver: Called with timeout [%d] interval [%d] Blanking [%d] Exposure [%d].\n",
- stuff -> timeout, stuff -> interval, blankingOption, exposureOption);
- #endif
-
- if (nxagentOption(Timeout) == 0)
- {
-#endif
- if (blankingOption == DefaultBlanking)
- {
- ScreenSaverBlanking = defaultScreenSaverBlanking;
- }
- else
- {
- ScreenSaverBlanking = blankingOption;
- }
-
- if (exposureOption == DefaultExposures)
- {
- ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
- }
- else
- {
- ScreenSaverAllowExposures = exposureOption;
- }
-
- if (stuff->timeout >= 0)
- {
- ScreenSaverTime = stuff->timeout * MILLI_PER_SECOND;
- }
- else
- {
- ScreenSaverTime = defaultScreenSaverTime;
- }
-
- if (stuff->interval >= 0)
- {
- ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND;
- }
- else
- {
- ScreenSaverInterval = defaultScreenSaverInterval;
- }
-
- SetScreenSaverTimer();
-#ifdef NXAGENT_SERVER
- }
-
- #ifdef TEST
-
- else
- {
- fprintf(stderr, "ProcSetScreenSaver: Keeping auto-disconnect timeout set to [%d] seconds.\n",
- nxagentOption(Timeout));
- }
-
- #endif
-#endif
- return (client->noClientException);
-}
-
-
-int ProcForceScreenSaver(register ClientPtr client)
-{
- REQUEST(xForceScreenSaverReq);
-
- REQUEST_SIZE_MATCH(xForceScreenSaverReq);
-
- if ((stuff->mode != ScreenSaverReset) &&
- (stuff->mode != ScreenSaverActive))
- {
- client->errorValue = stuff->mode;
- return BadValue;
- }
-
-#ifdef NXAGENT_SERVER
- /*
- * The NX agent uses the screen saver procedure
- * to monitor the user activities and launch its
- * handlers (like timeout feature), so we can't
- * always allow the clients to force the screen
- * saver handler execution.
- */
-
- if (nxagentOption(Timeout) == 0)
- {
-#endif
- SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode);
-#ifdef NXAGENT_SERVER
- }
-
- #ifdef TEST
-
- else
- {
- fprintf(stderr, "ProcForceScreenSaver: Ignoring the client request with mode [%d].\n",
- stuff -> mode);
- }
-
- #endif
-#endif
-
- return client->noClientException;
-}
-
-
/**********************
* CloseDownClient
*
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index a29dff384..43d00a21d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -783,126 +783,3 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
return(Success);
}
-
-void
-SaveScreens(int on, int mode)
-{
- int i;
- int what;
- int type;
-
- if (on == SCREEN_SAVER_FORCER)
- {
- if (mode == ScreenSaverReset)
- what = SCREEN_SAVER_OFF;
- else
- what = SCREEN_SAVER_ON;
- type = what;
- }
- else
- {
- what = on;
- type = what;
- if (what == screenIsSaved)
- type = SCREEN_SAVER_CYCLE;
- }
- for (i = 0; i < screenInfo.numScreens; i++)
- {
- if (on == SCREEN_SAVER_FORCER)
- (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], on);
- if (savedScreenInfo[i].ExternalScreenSaver)
- {
-#ifdef NXAGENT_SERVER
- if (nxagentOption(Timeout) != 0)
- {
- #ifdef TEST
- fprintf(stderr, "SaveScreens: An external screen-saver handler is installed. "
- "Ignoring it to let the auto-disconnect feature work.\n");
- #endif
- }
- else
-#endif
- {
- if ((*savedScreenInfo[i].ExternalScreenSaver)
- (screenInfo.screens[i], type, on == SCREEN_SAVER_FORCER))
- continue;
- }
- }
- if (type == screenIsSaved)
- continue;
- switch (type) {
- case SCREEN_SAVER_OFF:
- if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED)
- {
- (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i],
- what);
- }
- else if (HasSaverWindow (i))
- {
- savedScreenInfo[i].pWindow = NullWindow;
- FreeResource(savedScreenInfo[i].wid, RT_NONE);
- }
- break;
- case SCREEN_SAVER_CYCLE:
- if (savedScreenInfo[i].blanked == SCREEN_IS_TILED)
- {
- WindowPtr pWin = savedScreenInfo[i].pWindow;
- /* make it look like screen saver is off, so that
- * NotClippedByChildren will compute a clip list
- * for the root window, so miPaintWindow works
- */
- screenIsSaved = SCREEN_SAVER_OFF;
-#ifndef NOLOGOHACK
- if (logoScreenSaver)
- (*pWin->drawable.pScreen->ClearToBackground)(pWin, 0, 0, 0, 0, FALSE);
-#endif
- (*pWin->drawable.pScreen->MoveWindow)(pWin,
- (short)(-(rand() % RANDOM_WIDTH)),
- (short)(-(rand() % RANDOM_WIDTH)),
- pWin->nextSib, VTMove);
-#ifndef NOLOGOHACK
- if (logoScreenSaver)
- DrawLogo(pWin);
-#endif
- screenIsSaved = SCREEN_SAVER_ON;
- }
- /*
- * Call the DDX saver in case it wants to do something
- * at cycle time
- */
- else if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED)
- {
- (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i],
- type);
- }
- break;
- case SCREEN_SAVER_ON:
- if (ScreenSaverBlanking != DontPreferBlanking)
- {
- if ((* screenInfo.screens[i]->SaveScreen)
- (screenInfo.screens[i], what))
- {
- savedScreenInfo[i].blanked = SCREEN_IS_BLANKED;
- continue;
- }
- if ((ScreenSaverAllowExposures != DontAllowExposures) &&
- TileScreenSaver(i, SCREEN_IS_BLACK))
- {
- savedScreenInfo[i].blanked = SCREEN_IS_BLACK;
- continue;
- }
- }
- if ((ScreenSaverAllowExposures != DontAllowExposures) &&
- TileScreenSaver(i, SCREEN_IS_TILED))
- {
- savedScreenInfo[i].blanked = SCREEN_IS_TILED;
- }
- else
- savedScreenInfo[i].blanked = SCREEN_ISNT_SAVED;
- break;
- }
- }
- screenIsSaved = what;
- if (mode == ScreenSaverReset)
- SetScreenSaverTimer();
-}