diff options
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/dix/dispatch.c | 5 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/window.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 149 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 123 |
4 files changed, 0 insertions, 279 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 6c18c5b59..6d0d61a15 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -3167,8 +3167,6 @@ ProcQueryBestSize (register ClientPtr client) return (client->noClientException); } - -#ifndef NXAGENT_SERVER int ProcSetScreenSaver (register ClientPtr client) { @@ -3224,7 +3222,6 @@ ProcSetScreenSaver (register ClientPtr client) SetScreenSaverTimer(); return (client->noClientException); } -#endif /* NXAGENT_SERVER */ int ProcGetScreenSaver(register ClientPtr client) @@ -3425,7 +3422,6 @@ ProcChangeCloseDownMode(register ClientPtr client) } } -#ifndef NXAGENT_SERVER int ProcForceScreenSaver(register ClientPtr client) { REQUEST(xForceScreenSaverReq); @@ -3441,7 +3437,6 @@ int ProcForceScreenSaver(register ClientPtr client) SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode); return client->noClientException; } -#endif /* NXAGENT_SERVER */ int ProcNoOperation(register ClientPtr client) { diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index d294e139d..9358a96c4 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -3334,7 +3334,6 @@ static void DrawLogo( ); #endif -#ifndef NXAGENT_SERVER void SaveScreens(int on, int mode) { @@ -3445,7 +3444,6 @@ SaveScreens(int on, int mode) if (mode == ScreenSaverReset) SetScreenSaverTimer(); } -#endif /* NXAGENT_SERVER */ static Bool TileScreenSaver(int i, int kind) 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(); -} |