[webkit-changes] [185483] trunk/Tools

Stephanie Lewis slewis at apple.com
Thu Jun 11 19:57:38 PDT 2015


> On Jun 11, 2015, at 7:16 PM, commit-queue at webkit.org wrote:
> 
> +
> +    @classmethod
> +    def moveCursor(cls, x, y):
> +        moveEvent = CGEventCreateMouseEvent(None, kCGEventMouseMoved, (x, y), kCGMouseButtonLeft)
> +        CGEventPost(kCGHIDEventTap, moveEvent)

We shouldn't move the cursor to 0,0.  Some people have actions when the mouse hits that corner.  The PLT uses 10,0 so its just slightly offset

 As a side note,  you can use CGWarpMouseCursorPosition to avoid creating a mouse event when you move the mouse.

— Stephanie


> +
> +    @classmethod
> +    def screenSize(cls):
> +        return NSScreen.mainScreen().frame().size

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-changes/attachments/20150611/5a6fbda5/attachment.html>


More information about the webkit-changes mailing list