summaryrefslogtreecommitdiff
path: root/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-01-14 09:38:51 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-02-05 08:50:56 +0100
commit9135dec42de1880bd8b2972ba01f97a219cb0093 (patch)
tree0751b7717ee66ad57020a5d9d8cedc34f6fcadb0 /src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
parent705ae10b204c5a5c47fe75a6ab324d5ed4cd173e (diff)
downloadqtwayland-9135dec42de1880bd8b2972ba01f97a219cb0093.tar.gz
Client: Implement QPlatformWindow::startSystemResize
Task-number: QTBUG-73011 Change-Id: Ife0d9949b4d4dd7e6f16d3de88d0cb4bf4991e09 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp')
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index bd1f5a21..a8e66267 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -266,11 +266,14 @@ QWaylandXdgSurface::~QWaylandXdgSurface()
destroy();
}
-void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
+bool QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
- Q_ASSERT(m_toplevel && m_toplevel->isInitialized());
+ if (!m_toplevel || !m_toplevel->isInitialized())
+ return false;
+
auto resizeEdges = Toplevel::convertToResizeEdges(edges);
m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
+ return true;
}
bool QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice)