QWaylandWindow: Add a missing shell surface null check.

Caught by tst_QWidget::mapFromAndTo.

Change-Id: I36e08ebfa3bae1ac8667ee828b1762867d71c66d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
This commit is contained in:
Robin Burchell 2014-08-17 13:58:02 +02:00
parent d9ba141df9
commit 223fc10cde

View File

@ -657,18 +657,21 @@ bool QWaylandWindow::setWindowStateInternal(Qt::WindowState state)
// here. We use then this mState variable.
mState = state;
createDecoration();
switch (state) {
case Qt::WindowFullScreen:
mShellSurface->setFullscreen();
break;
case Qt::WindowMaximized:
mShellSurface->setMaximized();
break;
case Qt::WindowMinimized:
mShellSurface->setMinimized();
break;
default:
mShellSurface->setNormal();
if (mShellSurface) {
switch (state) {
case Qt::WindowFullScreen:
mShellSurface->setFullscreen();
break;
case Qt::WindowMaximized:
mShellSurface->setMaximized();
break;
case Qt::WindowMinimized:
mShellSurface->setMinimized();
break;
default:
mShellSurface->setNormal();
}
}
QWindowSystemInterface::handleWindowStateChanged(window(), mState);