Fix CursorInvoker wrongly positioning EventIcon palettes
Steps to reproduce: 1. Long press on home view favorite icon (an event icon) Expected: Palette invoker where finger is Actuall: Palette invokes in top left corner This is because the long press controller emits coords relative to the widget's window, and EventIcons sometimes have their own windows. We can't change the long press controller, as it is a public api. But we fix this by translating the coords to the root window coords in the CursorInvoker. Using root coords is consistent with the right click handleing in the cursor invoker.
This commit is contained in:
parent
0f4309a324
commit
2971749b83
@ -1381,6 +1381,7 @@ class CursorInvoker(Invoker):
|
|||||||
|
|
||||||
def __long_pressed_event_cb(self, controller, x, y, widget):
|
def __long_pressed_event_cb(self, controller, x, y, widget):
|
||||||
self._long_pressed_recognized = True
|
self._long_pressed_recognized = True
|
||||||
|
x, y = widget.get_window().get_root_coords(x, y)
|
||||||
self.notify_right_click(x, y)
|
self.notify_right_click(x, y)
|
||||||
|
|
||||||
def get_toplevel(self):
|
def get_toplevel(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user