Check if we have a shellSurface in the decoration
Change-Id: I984163753791a640a99e182b55746f486c0a01cb
This commit is contained in:
parent
02f0ea8fc2
commit
bc14c870c8
@ -129,7 +129,7 @@ void QWaylandAbstractDecoration::setMouseButtons(Qt::MouseButtons mb)
|
|||||||
void QWaylandAbstractDecoration::startResize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize resize, Qt::MouseButtons buttons)
|
void QWaylandAbstractDecoration::startResize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize resize, Qt::MouseButtons buttons)
|
||||||
{
|
{
|
||||||
Q_D(QWaylandAbstractDecoration);
|
Q_D(QWaylandAbstractDecoration);
|
||||||
if (isLeftClicked(buttons)) {
|
if (isLeftClicked(buttons) && d->m_wayland_window->shellSurface()) {
|
||||||
d->m_wayland_window->shellSurface()->resize(inputDevice, resize);
|
d->m_wayland_window->shellSurface()->resize(inputDevice, resize);
|
||||||
inputDevice->removeMouseButtonFromState(Qt::LeftButton);
|
inputDevice->removeMouseButtonFromState(Qt::LeftButton);
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ void QWaylandAbstractDecoration::startResize(QWaylandInputDevice *inputDevice, e
|
|||||||
void QWaylandAbstractDecoration::startMove(QWaylandInputDevice *inputDevice, Qt::MouseButtons buttons)
|
void QWaylandAbstractDecoration::startMove(QWaylandInputDevice *inputDevice, Qt::MouseButtons buttons)
|
||||||
{
|
{
|
||||||
Q_D(QWaylandAbstractDecoration);
|
Q_D(QWaylandAbstractDecoration);
|
||||||
if (isLeftClicked(buttons)) {
|
if (isLeftClicked(buttons) && d->m_wayland_window->shellSurface()) {
|
||||||
d->m_wayland_window->shellSurface()->move(inputDevice);
|
d->m_wayland_window->shellSurface()->move(inputDevice);
|
||||||
inputDevice->removeMouseButtonFromState(Qt::LeftButton);
|
inputDevice->removeMouseButtonFromState(Qt::LeftButton);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user