Author: jimtabor
Date: Mon Aug 22 19:58:32 2011
New Revision: 53385
URL:
http://svn.reactos.org/svn/reactos?rev=53385&view=rev
Log:
[Win32k]
- Implement FlashWindowEx without the state verification test via global atom and window
properties list. Pass all but two in win:test_FlashWindowEx.
- Add missing atom's and global thread information pointer, based on patch from bug
5655.
Modified:
trunk/reactos/subsystems/win32/win32k/include/ntuser.h
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c
Modified: trunk/reactos/subsystems/win32/win32k/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/ntuser.h [iso-8859-1] Mon Aug 22
19:58:32 2011
@@ -10,6 +10,7 @@
#define UserLeaveCo UserLeave
extern PSERVERINFO gpsi;
+extern PTHREADINFO gptiCurrent;
INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID);
VOID FASTCALL CleanupUserImpl(VOID);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Mon Aug 22
19:58:32 2011
@@ -1157,14 +1157,45 @@
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL APIENTRY
NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
{
- STUB
-
- return 1;
+ PWND pWnd;
+ FLASHWINFO finfo = {0};
+ BOOL Ret = TRUE;
+
+ UserEnterExclusive();
+
+ _SEH2_TRY
+ {
+ ProbeForRead(pfwi, sizeof(FLASHWINFO), sizeof(ULONG));
+ RtlCopyMemory(&finfo, pfwi, sizeof(FLASHWINFO));
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ Ret = FALSE;
+ }
+ _SEH2_END
+
+ if (!Ret) goto Exit;
+
+ if (!(pWnd = (PWND)UserGetObject(gHandleTable, finfo.hwnd, otWindow)) ||
+ finfo.cbSize != sizeof(FLASHWINFO) ||
+ finfo.dwFlags & ~(FLASHW_ALL|FLASHW_TIMER|FLASHW_TIMERNOFG) )
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ Ret = FALSE;
+ goto Exit;
+ }
+
+ //Ret = IntFlashWindowEx(pWnd, &finfo);
+
+Exit:
+ UserLeave();
+ return Ret;
}
/*
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] Mon Aug 22 19:58:32
2011
@@ -17,9 +17,12 @@
/* GLOBALS *******************************************************************/
+PTHREADINFO gptiCurrent = NULL;
ERESOURCE UserLock;
ATOM AtomMessage; // Window Message atom.
ATOM AtomWndObj; // Window Object atom.
+ATOM AtomLayer; // Window Layer atom.
+ATOM AtomFlashWndState; // Window Flash State atom.
BOOL gbInitialized;
HINSTANCE hModClient = NULL;
BOOL ClientPfnInit = FALSE;
@@ -46,6 +49,8 @@
gpsi->atomContextHelpIdProp = IntAddGlobalAtom(L"SysCH", TRUE);
AtomWndObj = IntAddGlobalAtom(L"SysWNDO", TRUE);
+ AtomLayer = IntAddGlobalAtom(L"SysLayer", TRUE);
+ AtomFlashWndState = IntAddGlobalAtom(L"FlashWState", TRUE);
return STATUS_SUCCESS;
}
@@ -222,6 +227,7 @@
ASSERT_NOGDILOCKS();
KeEnterCriticalRegion();
ExAcquireResourceExclusiveLite(&UserLock, TRUE);
+ gptiCurrent = PsGetCurrentThreadWin32Thread();
}
VOID FASTCALL UserLeave(VOID)