wayland: Check that seat has wl_pointer before canceling gestures

The seat must have the wl_pointer capability in order to gestures work.
This commit is contained in:
Vlad Zahorodnii 2021-03-12 09:15:40 +02:00
parent 9786ea3c58
commit 5b6c36f953

View file

@ -127,8 +127,10 @@ void PointerInputRedirection::init()
if (waylandServer()->hasScreenLockerIntegration()) {
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this,
[this] {
waylandServer()->seat()->cancelPointerPinchGesture();
waylandServer()->seat()->cancelPointerSwipeGesture();
if (waylandServer()->seat()->hasPointer()) {
waylandServer()->seat()->cancelPointerPinchGesture();
waylandServer()->seat()->cancelPointerSwipeGesture();
}
update();
}
);