Example #1
0
 def button_action(self, pointer, button, pressed, deviceid=-1, *args):
     event = BUTTON_EVENTS.get((button, pressed))
     if event is None:
         log.warn("no matching event found for button=%s, pressed=%s", button, pressed)
         return
     elif event is NOEVENT:
         return
     dwFlags, dwData = event
     x, y = pointer[:2]
     mouse_event(dwFlags, x, y, dwData, 0)
Example #2
0
 def do_process_button_action(self, proto, wid, button, pressed, pointer,
                              modifiers, *args):
     self._update_modifiers(proto, wid, modifiers)
     x, y = self._process_mouse_common(proto, wid, pointer)
     self._server_sources.get(proto).user_event()
     event = BUTTON_EVENTS.get((button, pressed))
     if event is None:
         log.warn("no matching event found for button=%s, pressed=%s",
                  button, pressed)
         return
     elif event is NOEVENT:
         return
     dwFlags, dwData = event
     mouse_event(dwFlags, x, y, dwData, 0)