Skip to content

Commit

Permalink
Correct the x and y values for pilot-induced clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Mar 13, 2023
1 parent fcda3c3 commit 76747d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/textual/pilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ def _get_mouse_message_arguments(
target: Widget, offset: Offset = Offset(), button: int = 0
) -> dict[str, Any]:
"""Get the arguments to pass into mouse messages for the click and hover methods."""
x, y = offset
click_x, click_y, _, _ = target.region.translate(offset)
message_arguments = {
"x": x,
"y": y,
"x": click_x,
"y": click_y,
"delta_x": 0,
"delta_y": 0,
"button": button,
Expand Down

0 comments on commit 76747d1

Please sign in to comment.