Pass screen relative coordinates in the popup event

This commit is contained in:
Marco Pesenti Gritti 2006-09-14 21:01:59 +02:00
parent 8265e29cdf
commit e12881e36b

View File

@ -257,6 +257,13 @@ class IconItem(goocanvas.ItemSimple, goocanvas.Item):
[x2, y2] = canvas.convert_to_pixels(view.get_bounds().x2, [x2, y2] = canvas.convert_to_pixels(view.get_bounds().x2,
view.get_bounds().y2) view.get_bounds().y2)
[window_x, window_y] = canvas.window.get_origin()
x1 += window_x
y1 += window_y
x2 += window_x
y2 += window_y
self.emit('popup', int(x1), int(y1), int(x2), int(y2)) self.emit('popup', int(x1), int(y1), int(x2), int(y2))
def _popdown(self): def _popdown(self):