- Add patch back after sync with force.
[reactos.git] / rostests / winetests / user32 / input.c
index 460e0fb..d81240c 100755 (executable)
  *    if it is a problem.
  *
  */
-
-#define _WIN32_WINNT 0x500
+#undef _WIN32_WINNT
+#undef _WIN32_IE
 #define _WIN32_IE 0x0500
+#define _WIN32_WINNT 0x500
 
 #include <stdarg.h>
 #include <assert.h>
@@ -251,8 +252,8 @@ static BOOL do_test( HWND hwnd, int seqnr, const KEV td[] )
                   MSGNAME[msg.message - WM_KEYFIRST], msg.wParam, msg.lParam, msg.time);
         if( i < kmctr ) {
             ok( msg.message == expmsg[i].message &&
-                    msg.wParam == expmsg[i].wParam &&
-                    msg.lParam == expmsg[i].lParam,
+                msg.wParam == expmsg[i].wParam &&
+                msg.lParam == expmsg[i].lParam,
                 "%u/%u: wrong message %x/%08lx/%08lx expected %s/%08lx/%08lx\n",
                 seqnr, i, msg.message, msg.wParam, msg.lParam,
                 MSGNAME[(expmsg[i]).message - WM_KEYFIRST], expmsg[i].wParam, expmsg[i].lParam );
@@ -331,7 +332,7 @@ static LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam,
         LPARAM lParam )
 {
     return DefWindowProcA( hWnd, msg, wParam, lParam );
-    }
+}
 
 static void test_Input_whitebox(void)
 {
@@ -344,15 +345,15 @@ static void test_Input_whitebox(void)
     wclass.lpfnWndProc   = WndProc;
     wclass.hInstance     = hInstance;
     wclass.hIcon         = LoadIconA( 0, IDI_APPLICATION );
-    wclass.hCursor       = LoadCursorA( NULL, IDC_ARROW);
-    wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1);
+    wclass.hCursor       = LoadCursorA( NULL, IDC_ARROW );
+    wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 );
     wclass.lpszMenuName = 0;
     wclass.cbClsExtra    = 0;
     wclass.cbWndExtra    = 0;
     RegisterClassA( &wclass );
     /* create the test window that will receive the keystrokes */
     hWndTest = CreateWindowA( wclass.lpszClassName, "InputSysKeyTest",
-                WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100,
+                              WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100,
                               NULL, NULL, hInstance, NULL);
     assert( hWndTest );
     ShowWindow( hWndTest, SW_SHOW);
@@ -381,11 +382,11 @@ static void empty_message_queue(void)
         if (MsgWaitForMultipleObjects(0, NULL, FALSE, min_timeout, QS_ALLINPUT) == WAIT_TIMEOUT) break;
         while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
         {
-        TranslateMessage(&msg);
-        DispatchMessage(&msg);
-    }
+            TranslateMessage(&msg);
+            DispatchMessage(&msg);
+        }
         diff = time - GetTickCount();
-}
+    }
 }
 
 struct transition_s {
@@ -845,11 +846,11 @@ static LRESULT CALLBACK WndProc2(HWND hWnd, UINT Msg, WPARAM wParam,
         ok(sent_messages_cnt < MAXKEYMESSAGES, "Too many messages\n");
         if (sent_messages_cnt < MAXKEYMESSAGES)
         {
-        sent_messages[sent_messages_cnt].message = Msg;
-        sent_messages[sent_messages_cnt].flags = 0;
-        sent_messages[sent_messages_cnt].wParam = wParam;
-        sent_messages[sent_messages_cnt++].lParam = HIWORD(lParam) & (KF_UP|KF_EXTENDED);
-    }
+            sent_messages[sent_messages_cnt].message = Msg;
+            sent_messages[sent_messages_cnt].flags = 0;
+            sent_messages[sent_messages_cnt].wParam = wParam;
+            sent_messages[sent_messages_cnt++].lParam = HIWORD(lParam) & (KF_UP|KF_EXTENDED);
+        }
     }
     return DefWindowProc(hWnd, Msg, wParam, lParam);
 }
@@ -863,10 +864,10 @@ static LRESULT CALLBACK hook_proc(int code, WPARAM wparam, LPARAM lparam)
         ok(sent_messages_cnt < MAXKEYMESSAGES, "Too many messages\n");
         if (sent_messages_cnt < MAXKEYMESSAGES)
         {
-        sent_messages[sent_messages_cnt].message = wparam;
-        sent_messages[sent_messages_cnt].flags = hook;
-        sent_messages[sent_messages_cnt].wParam = hook_info->vkCode;
-        sent_messages[sent_messages_cnt++].lParam = hook_info->flags & (LLKHF_UP|LLKHF_EXTENDED);
+            sent_messages[sent_messages_cnt].message = wparam;
+            sent_messages[sent_messages_cnt].flags = hook;
+            sent_messages[sent_messages_cnt].wParam = hook_info->vkCode;
+            sent_messages[sent_messages_cnt++].lParam = hook_info->flags & (LLKHF_UP|LLKHF_EXTENDED);
         }
 
 if(0) /* For some reason not stable on Wine */
@@ -1395,7 +1396,7 @@ static void test_GetMouseMovePointsEx(void)
     if (retval == -1)
         ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
     else
-    ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
+        ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
 
     /* test fourth parameter
      * a value higher than 64 is expected to fail with ERROR_INVALID_PARAMETER
@@ -1413,7 +1414,7 @@ static void test_GetMouseMovePointsEx(void)
     if (retval == -1)
         ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
     else
-    ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
+        ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
 
     SetLastError(MYERROR);
     count = BUFLIM;
@@ -1421,7 +1422,7 @@ static void test_GetMouseMovePointsEx(void)
     if (retval == -1)
         ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
     else
-    ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
+        ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
 
     SetLastError(MYERROR);
     retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS);
@@ -1508,7 +1509,7 @@ static void test_key_map(void)
             ok(vkey != numpad_collisions[i][0],
                "Got numpad vKey %x for scan code %x when there was another choice\n",
                vkey, numpad_scan);
-}
+        }
     }
 }