[MSGINA] Fix the order of checking for a valid / visible window, spotted by 'leha...
[reactos.git] / reactos / dll / win32 / msgina / dimmedwindow.cpp
index 0a3abad..0b93e0d 100644 (file)
@@ -104,7 +104,7 @@ public:
     {
         MSG msg;
 
-        while (!IsWindowVisible(m_hwnd) && IsWindow(m_hwnd))
+        while (IsWindow(m_hwnd) && !IsWindowVisible(m_hwnd))
         {
             while (::PeekMessage(&msg, m_hwnd, 0, 0, PM_REMOVE))
             {