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

Added XFlush call to WindowImplX11::setMouseCursor #1686

Merged
merged 1 commit into from Jul 22, 2020

Conversation

texus
Copy link
Contributor

@texus texus commented Jul 18, 2020

Changing the mouse cursor on Linux with SFML doesn't happen instantaneously.
When an application calls XDefineCursor directly shortly after having set the cursor via SFML (e.g. in order to use a system cursor that SFML doesn't support), then the calls will be executed in the wrong order. (If the same Display was used then they would be in the correct order, but the application can't access the display that SFML uses internally)
By calling XFlush after the call to XDefineCursor, the change is made immediately and external calls to XDefineCursor can no longer occur in the wrong order.

The XFlush call is already there in setMouseCursorVisible and other functions in WindowImplX11, it is just missing in setMouseCursor.

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Jul 21, 2020
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Jul 21, 2020
@eXpl0it3r eXpl0it3r moved this from Discussion to Review & Testing in SFML 2.6.0 Jul 21, 2020
Copy link
Member

@eXpl0it3r eXpl0it3r left a comment

Choose a reason for hiding this comment

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

Makes sense to me, but maybe @binary1248 has some additional remarks

Copy link
Member

@binary1248 binary1248 left a comment

Choose a reason for hiding this comment

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

Makes sense to me too... seems to be an oversight.

@eXpl0it3r eXpl0it3r moved this from Review & Testing to Ready in SFML 2.6.0 Jul 21, 2020
@eXpl0it3r eXpl0it3r merged commit 241b542 into SFML:master Jul 22, 2020
SFML 2.6.0 automation moved this from Ready to Done Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.6.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants