Skip to content

Commit e3ecf7c

Browse files
author
johanw
committed
Bugfixes and removing of unused print statements
1 parent 2d0fd3c commit e3ecf7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libinput-gestures

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ class GESTURE:
411411
'Get threshold for update command'
412412
thresh = self.thresholds.get((motion, self.fingers)) or \
413413
self.thresholds.get(motion)
414-
print(thresh)
415414
if thresh == None:
416415
thresh=0
417416
return int(thresh)
@@ -465,9 +464,10 @@ class SWIPE(GESTURE):
465464
if self.has_extended and aby > 0 and abx / aby > OBLIQUE_RATIO:
466465
motion = ('left_' if x2 < 0 else 'right_') + motion
467466
if self.thresholdmove(motion) > 0:
468-
if abx**2 + aby**2-self.moved > self.thresholdmove(motion):
467+
if abx**2 + aby**2-self.moved**2 > self.thresholdmove(motion):
468+
self.moved+=self.thresholdmove(motion)
469469
self.action(motion)
470-
self.moved+=abx**2 + aby**2
470+
471471
return True
472472

473473
def end(self):
@@ -554,7 +554,7 @@ def conf_gesture(lineargs):
554554
fingers = None
555555
thresh, *gcommand = command.split(maxsplit=1)
556556
if thresh.isnumeric():
557-
command = gcommand[0] if fcommand else ''
557+
command = gcommand[0] if gcommand else ''
558558
else:
559559
thresh = 0
560560
# Add the configured gesture

0 commit comments

Comments
 (0)