Gabriel Ivăncescu : ddraw: Check the foreground window in addition to the device state in ddraw_update_lost_surfaces().