nitpicker: report no mode smaller than 1x1 pixels

Issue #3812
This commit is contained in:
Norman Feske 2020-07-08 16:13:59 +02:00
parent 320387db89
commit 6743669ab8

View File

@ -391,7 +391,14 @@ void Gui_session::execute()
Framebuffer::Mode Gui_session::mode()
{
return Framebuffer::Mode { .area = screen_area(_view_stack.size()) };
Area const screen = screen_area(_view_stack.size());
/*
* Return at least a size of 1x1 to spare the clients the need to handle
* the special case of 0x0, which can happen at boot time before the
* framebuffer driver is running.
*/
return { .area = { max(screen.w(), 1u), max(screen.h(), 1u) } };
}