mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 03:45:24 +00:00
sdl: react upon framebuffer resize to 0x0
Treat minimizing the framebuffer as explicit SDL_QUIT event.
This commit is contained in:
parent
bd91e70fae
commit
e6c5ea21b4
@ -94,7 +94,20 @@ extern "C" {
|
||||
if (video_events.resize_pending) {
|
||||
video_events.resize_pending = false;
|
||||
|
||||
SDL_PrivateResize(video_events.width, video_events.height);
|
||||
int const width = video_events.width;
|
||||
int const height = video_events.height;
|
||||
|
||||
bool const quit = width == 0 && height == 0;
|
||||
|
||||
if (!quit)
|
||||
SDL_PrivateResize(width, height);
|
||||
else {
|
||||
/* at least try to quit w/o other event handling */
|
||||
if (SDL_PrivateQuit())
|
||||
return;
|
||||
else
|
||||
Genode::warning("could not deliver requested SDL_QUIT event");
|
||||
}
|
||||
}
|
||||
|
||||
if (!input->pending())
|
||||
|
Loading…
x
Reference in New Issue
Block a user