Skip to content

Cursor capture behavior changed in Windows 11 #87

Open

Description

@artths

What were the changes to cursor capture in Windows 11?
I need to take a capture and show the image on the same computer. I used to hide the system cursor with ShowSystemCursor(FALSE), but the cursor was still captured and shown in the final image. Now on Windows 11 (22000.100), if I hide the cursor, it is also not captured, if I don’t hide it, I see 2 cursors.

Activity

  1. robmikh commented on Aug 11, 2021

    @robmikh
    Member

    Do you mean ShowCursor? If so, I'm unable to reproduce this. Although, I'm trying this on a slightly newer version, so it's possible a regression was fixed that has yet to go out.

  2. artths commented on Aug 11, 2021

    @artths
    Author

    No, I mean private ShowSystemCursor() from user32.dll to hide system cursor completely. Or public MagShowSystemCursor does the same thing. If I use ShowCursor() I still see 2 cursors at the time.

  3. robmikh commented on Aug 11, 2021

    @robmikh
    Member

    Hmmm, I switched my test app to use MagShowSystemCursor and still can't reproduce it. I'll see if I can get on the version of Windows you're using to see if this really was fixed in a newer version.

  4. artths commented on Aug 11, 2021

    @artths
    Author

    Have you called the MagInitialize() prior to calling MagShowSystemCursor? Otherwise it won't work.
    I just tried build 22000.120 and still don't see the cursor in the captured image if the system cursor is completely hidden. I used your ScreenCaptureforHWND project, just added MagInitialize() and MagShowSystemCursor(FALSE).
    Maybe the reason is in Windows SDK version? I'm using 10.0.19041.0

  5. robmikh commented on Aug 12, 2021

    @robmikh
    Member

    Yes, MagShowSystemCursor is working correctly. The SDK will not impact this kind of behavior, it doesn't contain implementations, just interfaces and metadata.

  6. artths commented on Aug 13, 2021

    @artths
    Author

    22000.132 still has this issue. I'll wait for you to confirm that this has been fixed in newer releases. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions