@@ -225,12 +225,12 @@ var GesturesManager = class {
225225
226226 gesture_update ( client , type , direction , percentage , fingers , device , elapsed_time ) {
227227 if ( this . current_gesture == null ) {
228- global . logWarning ( "Gesture update but there's no current one." ) ;
228+ debug_gesture ( "Gesture update but there's no current one." ) ;
229229 return ;
230230 }
231231
232232 const def = this . lookup_definition ( type , direction , fingers ) ;
233- if ( def == null || this . current_gesture == null || def !== this . current_gesture . definition ) {
233+ if ( def == null || def !== this . current_gesture . definition ) {
234234 this . current_gesture = null ;
235235 global . logWarning ( "Invalid gesture update received, clearing current gesture" ) ;
236236 return ;
@@ -241,10 +241,14 @@ var GesturesManager = class {
241241 }
242242
243243 gesture_end ( client , type , direction , percentage , fingers , device , elapsed_time ) {
244- const def = this . lookup_definition ( type , direction , fingers ) ;
245- let met_threshold = true ;
244+ if ( this . current_gesture == null ) {
245+ debug_gesture ( "Gesture end but there's no current one." ) ;
246+ return ;
247+ }
246248
247- if ( def == null || this . current_gesture == null || def !== this . current_gesture . definition ) {
249+ const def = this . lookup_definition ( type , direction , fingers ) ;
250+ if ( def == null || def !== this . current_gesture . definition ) {
251+ this . current_gesture = null ;
248252 global . logWarning ( "Invalid gesture end received, clearing current gesture" ) ;
249253 return ;
250254 }
0 commit comments