Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cursor capture not working, but with a twist #495

Copy link
Copy link

Description

@bog739
Issue body actions

Hello,

I cannot capture the cursor via setting the parameter with_cursor=True in mss(), even in the last released version, but I found a solution and I can get the cursor, but it appears four times, because of a cast of c_ulong. If I come up with a solution, I might come back to create PR.

On a linux setup, installed here: (../python3.10/site-packages/mss/linux.py)

# Added * 2 to get cast correctly at least
raw_data = cast(cursor_img.pixels, POINTER(c_ulong * region["height"] * region["width"] * 2))
raw = bytearray(raw_data.contents)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.