From bc14c870c8b137e96bebbecb34cdceba20da32da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 13 May 2015 09:37:04 +0200 Subject: [PATCH] Check if we have a shellSurface in the decoration Change-Id: I984163753791a640a99e182b55746f486c0a01cb --- src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp b/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp index 54a990b2d71..3f9852b2071 100644 --- a/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp +++ b/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp @@ -129,7 +129,7 @@ void QWaylandAbstractDecoration::setMouseButtons(Qt::MouseButtons mb) void QWaylandAbstractDecoration::startResize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize resize, Qt::MouseButtons buttons) { Q_D(QWaylandAbstractDecoration); - if (isLeftClicked(buttons)) { + if (isLeftClicked(buttons) && d->m_wayland_window->shellSurface()) { d->m_wayland_window->shellSurface()->resize(inputDevice, resize); inputDevice->removeMouseButtonFromState(Qt::LeftButton); } @@ -138,7 +138,7 @@ void QWaylandAbstractDecoration::startResize(QWaylandInputDevice *inputDevice, e void QWaylandAbstractDecoration::startMove(QWaylandInputDevice *inputDevice, Qt::MouseButtons buttons) { Q_D(QWaylandAbstractDecoration); - if (isLeftClicked(buttons)) { + if (isLeftClicked(buttons) && d->m_wayland_window->shellSurface()) { d->m_wayland_window->shellSurface()->move(inputDevice); inputDevice->removeMouseButtonFromState(Qt::LeftButton); }