diff --git a/lib/gesture/swipe_gesture.cpp b/lib/gesture/swipe_gesture.cpp index a8ba7c9..973df0f 100644 --- a/lib/gesture/swipe_gesture.cpp +++ b/lib/gesture/swipe_gesture.cpp @@ -177,7 +177,8 @@ namespace comfortable_swipe::gesture else { // not swiping, check if swipe will begin - if (std::regex_match(line, matches, gesture_swipe_begin) != 0) + if (std::regex_match(line, matches, gesture_swipe_begin) != 0 + || std::regex_match(line, matches, gesture_swipe_update) != 0) { // assign necessary variables for swipe begin this->flag_swiping = true; diff --git a/lib/gesture/swipe_gesture.regex.cpp b/lib/gesture/swipe_gesture.regex.cpp index 08a8c96..7dd1d04 100644 --- a/lib/gesture/swipe_gesture.regex.cpp +++ b/lib/gesture/swipe_gesture.regex.cpp @@ -34,7 +34,7 @@ namespace comfortable_swipe::gesture const char* swipe_gesture::GESTURE_BEGIN_REGEX_PATTERN = "^" // start of string "[ -]event\\d+" // event - "\\s+GESTURE_SWIPE_(?:BEGIN|UPDATE)" // gesture, (UPDATE: patch for Microsoft Surface Pro Touchpad) + "\\s+GESTURE_SWIPE_BEGIN" // gesture "\\s+\\S+" // timestamp "\\s+(\\d+)" // fingers "\\s*$" // end of string