1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Fixed WM_SETCURSOR handling for client areas

See issue #148.
This commit is contained in:
narzoul 2022-12-22 12:05:52 +01:00
parent 122224450a
commit b53678bfd4

View File

@ -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<HWND>(wParam))
{
return FALSE;
}
if (HTCLIENT == LOWORD(lParam))
{
auto cursor = GetClassLong(hwnd, GCL_HCURSOR);
if (cursor)
{
Gdi::Cursor::setCursor(reinterpret_cast<HCURSOR>(cursor));
SetCursor(reinterpret_cast<HCURSOR>(cursor));
return TRUE;
}
}
else