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,6 +657,8 @@ bool QWaylandWindow::setWindowStateInternal(Qt::WindowState state)
// here. We use then this mState variable.
mState = state;
createDecoration();
if (mShellSurface) {
switch (state) {
case Qt::WindowFullScreen:
mShellSurface->setFullscreen();
@ -670,6 +672,7 @@ bool QWaylandWindow::setWindowStateInternal(Qt::WindowState state)
default:
mShellSurface->setNormal();
}
}
QWindowSystemInterface::handleWindowStateChanged(window(), mState);
return true;