Check release mouse postion in CursorInvoker

This affect when a palette will be opened, by example in the BuddyIcon
in the Sugar home.
This commit is contained in:
Gonzalo Odiard 2015-07-24 12:00:02 -03:00
parent a19cf9ed27
commit a8e75af790

View File

@ -1334,6 +1334,11 @@ class CursorInvoker(Invoker):
return False
def __button_release_event_cb(self, button, event):
# check if the release is done outside of the parent widget
alloc = self._item.get_allocation()
if not (0 < event.x < alloc.width and 0 < event.y < alloc.height):
return False
if self._long_pressed_recognized:
self._long_pressed_recognized = False
return True