In WinXP if you minimize a FB window, then right click on the icon in the task bar, and select maximize, the window is maximized without switching to fullscreen, and with a stretched display. Position based code will not work correctly in the scaled display.
The SYSCOMMAND messagewParam == SC_MAXIMIZE is not handled.
To fix this you can add
case WM_SYSCOMMAND:
if ((!fb_win32.is_active) && (wParam == SC_MAXIMIZE)) {
SendMessage(hWnd,WM_SYSCOMMAND,SC_RESTORE, 0);
return 0;
}
to fb_hWin32WinProc in libfb_gfx_win32.c
and this will restore the window instead of maximizing it.
Garvan
The snippet is missing a break statement on the last line.
case WM_SYSCOMMAND:
if ((!fb_win32.is_active) && (wParam == SC_MAXIMIZE)) {
SendMessage(hWnd,WM_SYSCOMMAND,SC_RESTORE, 0);
return 0;
}
break;