From ae94215d06b2c66f782900499a6151455aa45e2a Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 16 Jan 2020 22:58:29 +0100 Subject: nxagent: remove now-obsolete own copies of ScreenSaver procs we moved the auto-disconnect feature to an own timer so there's no need for a special treatment in screen saver stuff anymore. --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 149 ------------------------ 1 file changed, 149 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c') 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 * -- cgit v1.2.3