qt5: respond to zero-resized framebuffer

Interpret a zero-resized framebuffer as hint to close the window.

Fixes #1792
This commit is contained in:
Christian Prochaska 2015-10-28 16:14:13 +01:00 committed by Christian Helmuth
parent ee25dcbae3
commit b766387069
1 changed files with 5 additions and 0 deletions

View File

@ -167,6 +167,11 @@ void QNitpickerPlatformWindow::_handle_mode_changed(unsigned int)
{
Framebuffer::Mode mode(_nitpicker_session.mode());
if ((mode.width() == 0) && (mode.height() == 0)) {
/* interpret a size of 0x0 as indication to close the window */
QWindowSystemInterface::handleCloseEvent(window(), 0);
}
if ((mode.width() != _current_mode.width()) ||
(mode.height() != _current_mode.height()) ||
(mode.format() != _current_mode.format())) {