Author: hpoussin
Date: Tue Jul 11 17:01:00 2006
New Revision: 23009
URL:
http://svn.reactos.org/svn/reactos?rev=23009&view=rev
Log:
[FORMATTING] Replace tabs by spaces.
No code change
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/input.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 Tue Jul 11 17:01:00 2006
@@ -158,27 +158,27 @@
VOID STDCALL
ScreenSaverThreadMain(PVOID StartContext)
{
- KEVENT Event;
- LARGE_INTEGER Timeout;
- LARGE_INTEGER DelayTimer;
- LARGE_INTEGER CurrentTime;
- LARGE_INTEGER DiffTimeMouse;
- LARGE_INTEGER DiffTimeKeyboard;
- UINT ScreenSaverTimeOut = 0;
- BOOL nPreviousState = FALSE;
- NTSTATUS Status;
-
-
- KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
- LOW_REALTIME_PRIORITY + 3);
-
- KeQuerySystemTime(&MouseInputCurrentTime);
- KeQuerySystemTime(&KeyboardInputCurrentTime);
-
- DelayTimer.QuadPart = -10000000LL; /* 1 second timeout */
-
- for(;;)
- {
+ KEVENT Event;
+ LARGE_INTEGER Timeout;
+ LARGE_INTEGER DelayTimer;
+ LARGE_INTEGER CurrentTime;
+ LARGE_INTEGER DiffTimeMouse;
+ LARGE_INTEGER DiffTimeKeyboard;
+ UINT ScreenSaverTimeOut = 0;
+ BOOL nPreviousState = FALSE;
+ NTSTATUS Status;
+
+
+ KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
+ LOW_REALTIME_PRIORITY + 3);
+
+ KeQuerySystemTime(&MouseInputCurrentTime);
+ KeQuerySystemTime(&KeyboardInputCurrentTime);
+
+ DelayTimer.QuadPart = -10000000LL; /* 1 second timeout */
+
+ for(;;)
+ {
DPRINT("Screen Saver auto start Thread Waiting for start event\n");
Status = KeWaitForSingleObject(&InputThreadsStart,
0,
@@ -186,61 +186,61 @@
TRUE,
NULL);
DPRINT("Screen Saver auto start Thread Starting...\n");
- while(InputThreadsRunning)
- {
-
- IntSystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &ScreenSaverTimeOut, 0);
- IntSystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &nPreviousState, 0);
-
- Timeout.QuadPart = ((LONGLONG)ScreenSaverTimeOut) * 10000000LL;
-
- KeInitializeEvent(&Event, NotificationEvent, FALSE);
- Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DelayTimer);
-
- if(Status == STATUS_ALERTED && !InputThreadsRunning)
+ while(InputThreadsRunning)
+ {
+
+ IntSystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &ScreenSaverTimeOut,
0);
+ IntSystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &nPreviousState, 0);
+
+ Timeout.QuadPart = ((LONGLONG)ScreenSaverTimeOut) * 10000000LL;
+
+ KeInitializeEvent(&Event, NotificationEvent, FALSE);
+ Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DelayTimer);
+
+ if(Status == STATUS_ALERTED && !InputThreadsRunning)
{
break;
- }
+ }
if(!NT_SUCCESS(Status))
{
DPRINT1("Win32K: Failed to read from Screen Saver auto
thread.\n");
return; //(Status);
}
-
+
KeQuerySystemTime(&CurrentTime);
- DiffTimeMouse.QuadPart = CurrentTime.QuadPart - MouseInputCurrentTime.QuadPart;
- DiffTimeKeyboard.QuadPart = CurrentTime.QuadPart -
KeyboardInputCurrentTime.QuadPart;
-
- if ( (DiffTimeMouse.QuadPart >= Timeout.QuadPart) &&
- (DiffTimeKeyboard.QuadPart >= Timeout.QuadPart) &&
- (nPreviousState == FALSE))
- {
- BOOL nPreviousState = FALSE;
- 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);
-
- 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);
- }
-
- if ( (DiffTimeMouse.QuadPart < Timeout.QuadPart) &&
- (DiffTimeKeyboard.QuadPart < Timeout.QuadPart) &&
- (nPreviousState == TRUE))
- {
+ DiffTimeMouse.QuadPart = CurrentTime.QuadPart - MouseInputCurrentTime.QuadPart;
+ DiffTimeKeyboard.QuadPart = CurrentTime.QuadPart -
KeyboardInputCurrentTime.QuadPart;
+
+ if ( (DiffTimeMouse.QuadPart >= Timeout.QuadPart) &&
+ (DiffTimeKeyboard.QuadPart >= Timeout.QuadPart) &&
+ (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);
+ }
+
+ if ( (DiffTimeMouse.QuadPart < Timeout.QuadPart) &&
+ (DiffTimeKeyboard.QuadPart < Timeout.QuadPart) &&
+ (nPreviousState == TRUE))
+ {
IntSystemParametersInfo(SPI_SETSCREENSAVERRUNNING, FALSE,
&nPreviousState, 0);
- }
-
-
- }
- DPRINT("Screen Saver auto start Thread Stopped...\n");
- }
+ }
+
+
+ }
+ DPRINT("Screen Saver auto start Thread Stopped...\n");
+ }
}
@@ -263,7 +263,7 @@
KEVENT Event;
DueTime.QuadPart = (LONGLONG)(-10000000);
KeInitializeEvent(&Event, NotificationEvent, FALSE);
- Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DueTime);
+ Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DueTime);
Status = NtOpenFile(&MouseDeviceHandle,
FILE_ALL_ACCESS,
&MouseObjectAttributes,
@@ -319,8 +319,8 @@
}
DPRINT("MouseEvent\n");
- KeQuerySystemTime(&MouseInputCurrentTime);
-
+ KeQuerySystemTime(&MouseInputCurrentTime);
+
UserEnterExclusive();
ProcessMouseInputData(&MouseInput, Iosb.Information /
sizeof(MOUSE_INPUT_DATA));
@@ -531,7 +531,7 @@
KEVENT Event;
DueTime.QuadPart = (LONGLONG)(-10000000);
KeInitializeEvent(&Event, NotificationEvent, FALSE);
- Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DueTime);
+ Status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
&DueTime);
Status = NtOpenFile(&KeyboardDeviceHandle,
FILE_ALL_ACCESS,
&KeyboardObjectAttributes,
@@ -589,10 +589,10 @@
HWND hWnd;
int id;
- DPRINT("KeyInput @ %08x\n", &KeyInput);
+ DPRINT("KeyInput @ %08x\n", &KeyInput);
Status = NtReadFile (KeyboardDeviceHandle,
- NULL,
+ NULL,
NULL,
NULL,
&Iosb,
@@ -629,7 +629,7 @@
return; //(Status);
}
- KeQuerySystemTime(&KeyboardInputCurrentTime);
+ KeQuerySystemTime(&KeyboardInputCurrentTime);
/* Update modifier state */
fsModifiers = IntKeyboardGetModifiers(&KeyInput);
@@ -878,7 +878,7 @@
InitInputImpl(VOID)
{
NTSTATUS Status;
-
+
KeInitializeEvent(&InputThreadsStart, NotificationEvent, FALSE);
Status = PsCreateSystemThread(&KeyboardThreadHandle,