summaryrefslogtreecommitdiff
path: root/src/compositor/extensions
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-12 03:07:14 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-12 03:07:15 +0200
commit84613645a249dad8d4e47368c15b32ee140a6889 (patch)
tree949764f55247f77d54fa1ca6fc33261f16d0d168 /src/compositor/extensions
parent486c51912393bf56cae0e45931fb135579a930d3 (diff)
parent277de587f956dba2a68eb82b9666063ab12c51c4 (diff)
downloadqtwayland-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.cpp16
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);
}