input: prevent seat touch methods from being called when there's no touch
Otherwise we get a crash as we are asserting with Q_ASSERT(d->touch).
Here's a backtrace.
#0 KWaylandServer::TouchInterface::sendCancel() (this=0x0) at /home/apol/devel/frameworks/kwayland-server/src/server/touch_interface.cpp:60
#1 0x00007f69a35d59a2 in KWaylandServer::SeatInterface::cancelTouchSequence() (this=<optimized out>) at /home/apol/devel/frameworks/kwayland-server/src/server/seat_interface.cpp:1047
#2 0x00007f69a58c3c9e in KWin::TouchInputRedirection::cancel() (this=0x55b8c8910560) at /home/apol/devel/frameworks/kwin/src/touch_input.cpp:199
#3 KWin::TouchInputRedirection::init()::$_0::operator()() const (this=<optimized out>) at /home/apol/devel/frameworks/kwin/src/touch_input.cpp:47
#4 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KWin::TouchInputRedirection::init()::$_0>::call(KWin::TouchInputRedirection::init()::$_0&, void**) (f=<optimized out>, arg=<optimized out>) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:146
#5 QtPrivate::Functor<KWin::TouchInputRedirection::init()::$_0, 0>::call<QtPrivate::List<>, void>(KWin::TouchInputRedirection::init()::$_0&, void*, void**) (f=<optimized out>, arg=<optimized out>) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:256
#6 QtPrivate::QFunctorSlotObject<KWin::TouchInputRedirection::init()::$_0, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:443
#7 0x00007f69a5eb6806 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe3bcb0370, r=0x55b8c8910560, this=0x55b8c94d40f0) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#8 doActivate<false>(QObject*, int, void**) (sender=0x55b8c92f3630, signal_index=6, argv=0x7ffe3bcb0370) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#9 0x00007f69a46439e5 in ScreenLocker::KSldApp::lockStateChanged() (this=0x55b8c92f3630) at KScreenLocker_autogen/EWIEGA46WW/moc_ksldapp.cpp:224
#10 0x00007f69a46486c2 in ScreenLocker::KSldApp::lock(ScreenLocker::EstablishLock, int) (this=0x55b8c92f3630, establishLock=ScreenLocker::EstablishLock::Delayed, attemptCount=0) at /home/apol/devel/frameworks/kscreenlocker/ksldapp.cpp:436
#11 0x00007f69a4646afd in operator()(int) const (__closure=0x55b8c92e59c0, identifier=1) at /home/apol/devel/frameworks/kscreenlocker/ksldapp.cpp:204
#12 0x00007f69a464b77e in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, ScreenLocker::KSldApp::initialize()::<lambda(int)> >::call(struct {...} &, void **) (f=..., arg=0x7ffe3bcb0630) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:146
#13 0x00007f69a464b491 in QtPrivate::Functor<ScreenLocker::KSldApp::initialize()::<lambda(int)>, 1>::call<QtPrivate::List<int>, void>(struct {...} &, void *, void **) (f=..., arg=0x7ffe3bcb0630) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:256
#14 0x00007f69a464adf2 in QtPrivate::QFunctorSlotObject<ScreenLocker::KSldApp::initialize()::<lambda(int)>, 1, QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x55b8c92e59b0, r=0x55b8c92f3630, a=0x7ffe3bcb0630, ret=0x0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:443
#15 0x00007f69a5eb6806 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe3bcb0630, r=0x55b8c92f3630, this=0x55b8c92e59b0) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false>(QObject*, int, void**) (sender=0x55b8c93ab8e0, signal_index=4, argv=0x7ffe3bcb0630) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#17 0x00007f69a44e1f15 in KIdleTime::timeoutReached(int) (this=0x55b8c93ab8e0, _t1=1) at src/KF5IdleTime_autogen/include/moc_kidletime.cpp:197
#18 0x00007f69a44e191b in KIdleTimePrivate::_k_timeoutReached(int) (this=0x55b8c93b4b00, msec=300000) at /home/apol/devel/frameworks/kidletime/src/kidletime.cpp:278
#19 0x00007f69a44e1c12 in KIdleTime::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55b8c93ab8e0, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7ffe3bcb0820) at src/KF5IdleTime_autogen/include/moc_kidletime.cpp:118
#20 0x00007f69a5eb6840 in doActivate<false>(QObject*, int, void**) (sender=0x55b8c949c900, signal_index=4, argv=0x7ffe3bcb0820) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3898
#21 0x00007f69a44dfc39 in AbstractSystemPoller::timeoutReached(int) (this=0x55b8c949c900, _t1=300000) at src/KF5IdleTime_autogen/EWIEGA46WW/moc_abstractsystempoller.cpp:189
#22 0x00007f69a5eb6806 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe3bcb08e0, r=0x55b8c949c900, this=0x55b8c924f730) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#23 doActivate<false>(QObject*, int, void**) (sender=0x55b8c92db020, signal_index=3, argv=0x7ffe3bcb08e0) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#24 0x00007f69a4757992 in KWayland::Client::IdleTimeout::idle() (this=0x55b8c92db020) at src/client/KF5WaylandClient_autogen/EWIEGA46WW/moc_idle.cpp:252
#25 0x00007f69a4783d3d in KWayland::Client::IdleTimeout::Private::idleCallback(void*, org_kde_kwin_idle_timeout*) (data=0x55b8c93b37d0, org_kde_kwin_idle_timeout=0x55b8c940c560) at /home/apol/devel/frameworks/kwayland/src/client/idle.cpp:115
#26 0x00007f699f7f5acd in () at /usr/lib/libffi.so.7
#27 0x00007f699f7f503a in () at /usr/lib/libffi.so.7
#28 0x00007f699fd2efe4 in () at /usr/lib/libwayland-client.so.0
#29 0x00007f699fd2b563 in () at /usr/lib/libwayland-client.so.0
#30 0x00007f699fd2ccac in wl_display_dispatch_queue_pending () at /usr/lib/libwayland-client.so.0
#31 0x00007f69a477b562 in KWayland::Client::EventQueue::dispatch() (this=0x55b8c89b9f40) at /home/apol/devel/frameworks/kwayland/src/client/event_queue.cpp:72
#32 0x00007f69a477bdb1 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWayland::Client::EventQueue::*)()>::call(void (KWayland::Client::EventQueue::*)(), KWayland::Client::EventQueue*, void**)
(f=(void (KWayland::Client::EventQueue::*)(KWayland::Client::EventQueue * const)) 0x7f69a477b4c0 <KWayland::Client::EventQueue::dispatch()>, o=0x55b8c89b9f40, arg=0x7f69900047c8) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:152
#33 0x00007f69a477bd18 in QtPrivate::FunctionPointer<void (KWayland::Client::EventQueue::*)()>::call<QtPrivate::List<>, void>(void (KWayland::Client::EventQueue::*)(), KWayland::Client::EventQueue*, void**)
(f=(void (KWayland::Client::EventQueue::*)(KWayland::Client::EventQueue * const)) 0x7f69a477b4c0 <KWayland::Client::EventQueue::dispatch()>, o=0x55b8c89b9f40, arg=0x7f69900047c8) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:185
#34 0x00007f69a477bc45 in QtPrivate::QSlotObject<void (KWayland::Client::EventQueue::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55b8c8981980, r=0x55b8c89b9f40, a=0x7f69900047c8, ret=0x0) at /home/apol/devel/kde5/include/QtCore/qobjectdefs_impl.h:418
#35 0x00007f69a5eac251 in QObject::event(QEvent*) (this=0x55b8c89b9f40, e=0x7f6990004780) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:1314
#36 0x00007f69a39c414f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55b8c89b9f40, e=0x7f6990004780) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3632
#37 0x00007f69a5e8022a in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55b8c89b9f40, event=0x7f6990004780) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1063
#38 0x00007f69a5e82c61 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55b8c8865520) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1817
#39 0x00007f69a5ed4c4a in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55b8c88a7a90, flags=...) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:468
#40 0x000055b8c8172a6d in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at /home/apol/devel/frameworks/qt5/qtbase/src/platformsupport/eventdispatchers/qunixeventdispatcher.cpp:63
#41 0x00007f69a5e7ebeb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe3bcb1190, flags=..., flags@entry=...) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/global/qflags.h:69
#42 0x00007f69a5e86e60 in QCoreApplication::exec() () at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/global/qflags.h:121
#43 0x000055b8c81482f2 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/apol/devel/frameworks/kwin/src/main_wayland.cpp:805