Author: greatlrd
Date: Fri Jul 14 01:21:30 2006
New Revision: 23047
URL:
http://svn.reactos.org/svn/reactos?rev=23047&view=rev
Log:
1. Fixing so the screensaver only start one time when ReactOS starting.
2. Fixing so the screensaver do not restart it self.
Alesky here is the bugfix I promies, it will not longer see alot start screen msg.
One bug remains before the reg key will be adding as defualt for matrix.scr so it
can run from livecd as well
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/input.c
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/input.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c Fri Jul 14 01:21:30 2006
@@ -167,6 +167,7 @@
UINT ScreenSaverTimeOut = 0;
BOOL nPreviousState = FALSE;
NTSTATUS Status;
+ BOOL FristTime = TRUE;
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
@@ -216,18 +217,25 @@
(nPreviousState == FALSE))
{
BOOL nPreviousState = FALSE;
- DPRINT("Keyboard and Mouse TimeOut Starting Screen Saver ...\n");
- DPRINT(" %I64d Keyboard Timeout
Value\n",DiffTimeKeyboard.QuadPart);
- DPRINT(" %I64d Mouse Timeout Value \n",DiffTimeMouse.QuadPart);
- DPRINT(" %I64d TimeOut \n",DiffTimeMouse.QuadPart);
-
- CSR_API_MESSAGE Request;
- CsrInit();
- Request.Type = MAKE_CSR_API(START_SCREEN_SAVER, CSR_GUI);
- Request.Data.StartScreenSaver.Start = TRUE;
- co_CsrNotifyScreenSaver(&Request );
-
- IntSystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &nPreviousState,
0);
+ DPRINT1("Keyboard and Mouse TimeOut Starting Screen Saver ...\n");
+ DPRINT1(" %I64d Keyboard Timeout
Value\n",DiffTimeKeyboard.QuadPart);
+ DPRINT1(" %I64d Mouse Timeout Value \n",DiffTimeMouse.QuadPart);
+ DPRINT1(" %I64d TimeOut \n",DiffTimeMouse.QuadPart);
+
+ if (FristTime == FALSE)
+ {
+ CSR_API_MESSAGE Request;
+ CsrInit();
+ Request.Type = MAKE_CSR_API(START_SCREEN_SAVER, CSR_GUI);
+ Request.Data.StartScreenSaver.Start = TRUE;
+ co_CsrNotifyScreenSaver(&Request );
+
+ IntSystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE,
&nPreviousState, 0);
+ }
+ else
+ {
+ FristTime = FALSE;
+ }
}
if ( (DiffTimeMouse.QuadPart < Timeout.QuadPart) &&
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Fri Jul 14 01:21:30 2006
@@ -1020,16 +1020,14 @@
return TRUE;
break;
case SPI_SETFLATMENU:
- WinStaObject->FlatMenu = uiParam;
- return TRUE;
+ WinStaObject->FlatMenu = uiParam;
break;
case SPI_GETSCREENSAVETIMEOUT:
if (pvParam != NULL) *((UINT*)pvParam) = WinStaObject->ScreenSaverTimeOut;
return TRUE;
break;
case SPI_SETSCREENSAVETIMEOUT:
- WinStaObject->ScreenSaverTimeOut = uiParam;
- return TRUE;
+ WinStaObject->ScreenSaverTimeOut = uiParam;
break;
case SPI_GETSCREENSAVERRUNNING:
if (pvParam != NULL) *((BOOL*)pvParam) =
WinStaObject->ScreenSaverRunning;
@@ -1037,8 +1035,7 @@
break;
case SPI_SETSCREENSAVERRUNNING:
if (pvParam != NULL) *((BOOL*)pvParam) = WinStaObject->ScreenSaverRunning;
- WinStaObject->ScreenSaverRunning = uiParam;
- return TRUE;
+ WinStaObject->ScreenSaverRunning = uiParam;
break;
case SPI_GETWHEELSCROLLLINES:
CurInfo = IntGetSysCursorInfo(WinStaObject);