# File gtk/sample/misc/mouse-gesture.rb, line 49 def update_position(x, y) mx = x - @prev_x my = y - @prev_y motion = judge_motion(mx, my) if motion @prev_x = @x = x @prev_y = @y = y if @motions.last == motion false else @motions << motion true end else false end end