Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor capture behavior changed in Windows 11 #87

Open
artths opened this issue Aug 9, 2021 · 6 comments
Open

Cursor capture behavior changed in Windows 11 #87

artths opened this issue Aug 9, 2021 · 6 comments

Comments

@artths
Copy link

artths commented Aug 9, 2021

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.

@robmikh
Copy link
Member

robmikh commented Aug 11, 2021

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.

@artths
Copy link
Author

artths commented Aug 11, 2021

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.

@robmikh
Copy link
Member

robmikh commented Aug 11, 2021

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.

@artths
Copy link
Author

artths commented Aug 11, 2021

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

@robmikh
Copy link
Member

robmikh commented Aug 12, 2021

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

@artths
Copy link
Author

artths commented Aug 13, 2021

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants