def click_cb(self, window, event): applet = self.get_applet_at_coords(event.x, event.y) if applet is not None: if event.button == MOUSE_BUTTON_RIGHT: applet.show_menu() else: x = event.x - applet.get_position()[0] y = event.y - applet.get_position()[1] applet.emit("click", x, y) elif event.button == MOUSE_BUTTON_RIGHT: self.menu.popup(None, None, None, event.button, event.get_time())
def click_cb(self, window, event): applet = self.get_applet_at_coords(event.x, event.y) if applet is not None: if event.button == MOUSE_BUTTON_RIGHT: applet.show_menu() else: x = event.x - applet.get_position()[0] y = event.y - applet.get_position()[1] applet.emit('click', x, y) elif event.button == MOUSE_BUTTON_RIGHT: self.menu.popup(None, None, None, event.button, event.get_time())
def scroll_cb(self, window, event): applet = self.get_applet_at_coords(event.x, event.y) if applet: offset_x, offset_y = applet.get_position() applet.emit("scroll", event.x - offset_x, event.y - offset_y, event.direction)
def mouse_leave_cb(self, window, event): applet = self.get_applet_at_coords(event.x, event.y) if applet: offset_x, offset_y = applet.get_position() applet.emit("mouse-leave", event.x - offset_x, event.y - offset_y)
def scroll_cb(self, window, event): applet = self.get_applet_at_coords(event.x, event.y) if applet: offset_x, offset_y = applet.get_position() applet.emit('scroll', event.x - offset_x, event.y - offset_y, event.direction)
def mouse_leave_cb(self, window, event): applet = self.get_applet_at_coords(event.x, event.y) if applet: offset_x, offset_y = applet.get_position() applet.emit('mouse-leave', event.x - offset_x, event.y - offset_y)