diff --git a/DDrawCompat/Gdi/User32WndProcs.cpp b/DDrawCompat/Gdi/User32WndProcs.cpp index ae30ad7..8a3c9d7 100644 --- a/DDrawCompat/Gdi/User32WndProcs.cpp +++ b/DDrawCompat/Gdi/User32WndProcs.cpp @@ -226,17 +226,23 @@ namespace } HWND parent = GetAncestor(hwnd, GA_PARENT); - if (parent && SendMessage(parent, msg, wParam, lParam)) + if (parent && GetDesktopWindow() != parent && SendMessage(parent, msg, wParam, lParam)) { return TRUE; } + if (hwnd != reinterpret_cast(wParam)) + { + return FALSE; + } + if (HTCLIENT == LOWORD(lParam)) { auto cursor = GetClassLong(hwnd, GCL_HCURSOR); if (cursor) { - Gdi::Cursor::setCursor(reinterpret_cast(cursor)); + SetCursor(reinterpret_cast(cursor)); + return TRUE; } } else