* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: input.c,v 1.28 2004/04/29 20:26:35 weiden Exp $
+/* $Id: input.c,v 1.29 2004/04/29 20:41:03 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
PW32THREAD OldBlock;
ASSERT(W32Thread);
- if(W32Thread->IsExiting && BlockIt)
+ if(!W32Thread->Desktop || (W32Thread->IsExiting && BlockIt))
{
/*
* fail blocking if exiting the thread
LPINPUT pInput,
INT cbSize)
{
+ PW32THREAD W32Thread;
UINT cnt;
+ W32Thread = PsGetWin32Thread();
+ ASSERT(W32Thread);
+
+ if(!W32Thread->Desktop)
+ {
+ return 0;
+ }
+
if(!nInputs || !pInput || (cbSize != sizeof(INPUT)))
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
* e.g. services running in the service window station cannot block input
*/
if(!ThreadHasInputAccess(W32Thread) ||
- !IntIsActiveDesktop(PsGetWin32Thread()->Desktop))
+ !IntIsActiveDesktop(W32Thread->Desktop))
{
SetLastWin32Error(ERROR_ACCESS_DENIED);
return 0;