示例#1
0
 def store_click(self, button, x, y):
     """ Stores incoming mouse-clicks """
     self.session.add(
         Click(button, True, x, y, len(self.mouse_path),
               self.current_window.proc_id, self.current_window.win_id,
               self.current_window.geo_id))
     self.mouse_path = []
     self.trycommit()
示例#2
0
    def store_click(self, button, x, y):
        """ Stores incoming mouse-clicks """

        #Put mouse locations and timings in arrays
        locs = [loc.xy for loc in self.mouse_path]
        timings = [loc.time for loc in self.mouse_path]

        self.session.add(
            Click(button, True, x, y, len(self.mouse_path), locs, timings,
                  self.current_window.proc_id, self.current_window.win_id,
                  self.current_window.geo_id))
        self.mouse_path = []
        self.trycommit()