diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-12 03:07:14 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-12 03:07:15 +0200 |
commit | 84613645a249dad8d4e47368c15b32ee140a6889 (patch) | |
tree | 949764f55247f77d54fa1ca6fc33261f16d0d168 /src/compositor/extensions | |
parent | 486c51912393bf56cae0e45931fb135579a930d3 (diff) | |
parent | 277de587f956dba2a68eb82b9666063ab12c51c4 (diff) | |
download | qtwayland-84613645a249dad8d4e47368c15b32ee140a6889.tar.gz |
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: If684b523436a1beec36a137c73c5c39c948f87e3
Diffstat (limited to 'src/compositor/extensions')
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellintegration.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellintegration.cpp b/src/compositor/extensions/qwaylandxdgshellintegration.cpp index 336ede3c..0aa16054 100644 --- a/src/compositor/extensions/qwaylandxdgshellintegration.cpp +++ b/src/compositor/extensions/qwaylandxdgshellintegration.cpp @@ -191,8 +191,12 @@ void XdgToplevelIntegration::handleUnsetMaximized() void XdgToplevelIntegration::handleMaximizedChanged() { if (m_toplevel->maximized()) { - QWaylandOutput *output = m_item->view()->output(); - m_item->moveItem()->setPosition(output->position() + output->availableGeometry().topLeft()); + if (auto *output = m_item->view()->output()) { + m_item->moveItem()->setPosition(output->position() + output->availableGeometry().topLeft()); + } else { + qCWarning(qLcWaylandCompositor) << "The view does not have a corresponding output," + << "ignoring maximized state"; + } } else { m_item->moveItem()->setPosition(windowedGeometry.initialPosition); } @@ -243,8 +247,12 @@ void XdgToplevelIntegration::handleUnsetFullscreen() void XdgToplevelIntegration::handleFullscreenChanged() { if (m_toplevel->fullscreen()) { - QWaylandOutput *output = m_item->view()->output(); - m_item->moveItem()->setPosition(output->position() + output->geometry().topLeft()); + if (auto *output = m_item->view()->output()) { + m_item->moveItem()->setPosition(output->position() + output->geometry().topLeft()); + } else { + qCWarning(qLcWaylandCompositor) << "The view does not have a corresponding output," + << "ignoring fullscreen state"; + } } else { m_item->moveItem()->setPosition(windowedGeometry.initialPosition); } |