1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

another fix for aero snap

This commit is contained in:
FunkyFr3sh 2023-08-22 16:01:58 +02:00
parent d222992d5a
commit d0cf8c6461

View File

@ -465,31 +465,8 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return DefWindowProc(hWnd, uMsg, wParam, lParam); /* Carmageddon fix */
}
case WM_NCMOUSELEAVE:
{
if (!g_ddraw->wine) /* hack: disable aero snap */
{
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);
if (!(style & WS_MAXIMIZEBOX))
{
real_SetWindowLongA(g_ddraw->hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX);
}
}
break;
}
case WM_SYSCOMMAND:
{
if ((wParam & ~0x0F) == SC_MOVE && !g_ddraw->wine) /* hack: disable aero snap */
{
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);
if ((style & WS_MAXIMIZEBOX))
{
real_SetWindowLongA(g_ddraw->hwnd, GWL_STYLE, style & ~WS_MAXIMIZEBOX);
}
}
if (wParam == SC_MAXIMIZE)
{
if (g_ddraw->resizable)