From 5b6c36f95373a7c5d2c0f1ba6bfee534e9e57eb0 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 12 Mar 2021 09:15:40 +0200 Subject: [PATCH] wayland: Check that seat has wl_pointer before canceling gestures The seat must have the wl_pointer capability in order to gestures work. --- src/pointer_input.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pointer_input.cpp b/src/pointer_input.cpp index ca781ac023..ce6e2f05c3 100644 --- a/src/pointer_input.cpp +++ b/src/pointer_input.cpp @@ -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(); } );