diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-05-13 09:37:04 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:10:32 +0200 |
commit | bd2409f6ea3616486973d0daf91811af1507c5d1 (patch) | |
tree | 3a74f5ca4cadd128ec25550ba0ee7280fe2ea1e8 /src/client/qwaylandabstractdecoration.cpp | |
parent | a54921d733043f78165fab10d4ae445ec3970078 (diff) |
Check if we have a shellSurface in the decoration
Change-Id: I984163753791a640a99e182b55746f486c0a01cb
Diffstat (limited to 'src/client/qwaylandabstractdecoration.cpp')
-rw-r--r-- | src/client/qwaylandabstractdecoration.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp index 54a990b2d..3f9852b20 100644 --- a/src/client/qwaylandabstractdecoration.cpp +++ b/src/client/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); } |