fheroes2
fheroes2 copied to clipboard
Program screen goes completely black after the program is minimized in taskbar and then brought to the foreground
Preliminary checks
- [X] I've checked that there aren't other open issues on the same topic.
- [X] I've checked that this issue is reproducible on the latest snapshot build.
Platform
Windows
Describe the bug
In windowed mode (when a View spell is active or the View World screen is used), when the game window is minimized in the taskbar, then the game is brought to the foreground (by clicking on the game icon in the taskbar), the game window is completely black (or sometimes completely white). It is necessary to switch to another program (by clicking its icon in the taskbar) and then return to the game window (again by clicking its icon in the taskbar) so that the content of the window is displayed correctly.
In fheroes2:
Save file
Not needed.
Additional info
Related closed issue: https://github.com/ihhub/fheroes2/issues/3392.
This is a different OS (Linux), but it might be relevant: https://github.com/ihhub/fheroes2/issues/4770
Interesting, I was not able to reproduce this issue so far using the "View World" screen. Is this observed with SDL1 or SDL2? What resolution is set in the game?
Hello @oleg-derevenetz,
Interesting, I was not able to reproduce this issue so far using the "View World" screen. Is this observed with SDL1 or SDL2? What resolution is set in the game?
Windows 7 - 64 bits - SDL2 - 640 x 480
I tested this on my 32-bit Win 7 SDL2 and I was able to replicate it. I had version 0.9.14 on the same PC and it did not show this behavior when restoring from minimized. It did not happen on my Win 10 device.
These symptoms indicate that we do not refresh frame for this dialog. I think we can come up with something simple and efficient at the same time by calling an internal sdl function to refresh screen.
Hi @LeHerosInconnu , can you please test the latest build to se if the issue is gone?
Hi, @ihhub. I tested this on my win 7 x86 setup with latest SDL2 snapshot and the problem was still reproducible.
Hello @ihhub,
Hi @LeHerosInconnu , can you please test the latest build to se if the issue is gone?
This is still the case on Windows 7 - 64 bits - SDL2 - 640 x 480, with version 0.9.21 6251.
Hi, @ihhub. I tested this on my win 7 x86 setup with latest SDL2 snapshot and the problem was still reproducible.
Could you please run the engine in debug mode and then attach the log file? I would like to see if there is something related to SDL.