Skip to content

Commit 214fa63

Browse files
Jeomonclaude
andcommitted
fix: align Desktop.click() default to single-click (clicks=1)
The Click-Tool definition exposed clicks=1 but Desktop.click() defaulted to clicks=2, causing unexpected double-clicks when callers relied on the default. Aligns the service layer to match the tool's documented behavior. Resolves the click-default mismatch from PR #282; null-guard fixes for resize_app/switch_app were already covered by the prior refactor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ed0c9d2 commit 214fa63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/windows_mcp/desktop/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def get_coordinates_from_labels(self, labels: list[int]) -> list[tuple[int, int]
627627
results.append((element_node.center.x, element_node.center.y))
628628
return results
629629

630-
def click(self, loc: tuple[int, int] | list[int], button: str = "left", clicks: int = 2):
630+
def click(self, loc: tuple[int, int] | list[int], button: str = "left", clicks: int = 1):
631631
if isinstance(loc, list):
632632
x, y = loc[0], loc[1]
633633
else:

0 commit comments

Comments
 (0)