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

Add logging when WM_CAPTURECHANGED is dropped #822

Merged

Conversation

teddemunnik
Copy link
Contributor

This is a small clean up of #695. It was considered alright to drop WM_CAPTURECHANGED messages when the window state is locked, because this happens when we call ReleaseCapture ourselves, and in that case we already update the relevant state ourselves and don't need the callback.

However I think it's actually better if we have the log in WM_CAPTURECHANGED in case it will be called reentrantly in another situation that we don't know about. Instead, I've made sure that we defer calling ReleaseCapture to a point where we're not locking the window state.

…ntrancy. Make sure not to call ReleaseCapture while a mutable reference exists to the window state.
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work!

@xStrom xStrom merged commit 3b3d7a0 into linebender:master Apr 9, 2020
@teddemunnik teddemunnik deleted the windows_capturechanged_reentrancy branch April 10, 2020 12:22
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

Successfully merging this pull request may close these issues.

2 participants