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/NXwindow.c | 123 -------------------------- 1 file changed, 123 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXwindow.c') 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(); -} -- cgit v1.2.3