sync with trunk r46493
[reactos.git] / subsystems / win32 / win32k / ntuser / message.c
index ad21612..1b244b0 100644 (file)
@@ -1053,9 +1053,11 @@ co_IntWaitMessage( PWINDOW_OBJECT Window,
    while ( (STATUS_WAIT_0 <= Status && Status <= STATUS_WAIT_63) ||
            STATUS_TIMEOUT == Status );
 
-   SetLastNtError(Status);
-
-   DPRINT1("Exit co_IntWaitMessage on error!\n");
+   if (!NT_SUCCESS(Status))
+   {
+      SetLastNtError(Status);
+      DPRINT1("Exit co_IntWaitMessage on error!\n");
+   }
 
    return FALSE;
 }
@@ -2283,7 +2285,7 @@ NtUserDispatchMessage(PMSG UnsafeMsgInfo)
 
 BOOL APIENTRY
 NtUserTranslateMessage(LPMSG lpMsg,
-                       HKL dwhkl)
+                       UINT flags)
 {
    NTSTATUS Status;
    MSG SafeMsg;
@@ -2299,7 +2301,7 @@ NtUserTranslateMessage(LPMSG lpMsg,
       RETURN( FALSE);
    }
 
-   RETURN( IntTranslateKbdMessage(&SafeMsg, dwhkl));
+   RETURN( IntTranslateKbdMessage(&SafeMsg, flags));
 
 CLEANUP:
    DPRINT("Leave NtUserTranslateMessage: ret=%i\n",_ret_);
@@ -2626,7 +2628,7 @@ NtUserWaitForInputIdle(
 WaitExit:
   if (W32Process->InputIdleEvent)
   {
-     EngDeleteEvent((PEVENT)W32Process->InputIdleEvent);
+     EngFreeMem((PVOID)W32Process->InputIdleEvent);
      W32Process->InputIdleEvent = NULL;
   }
   ObDereferenceObject(Process);