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

Fix the cursor not always grabbed again correctly after a focus gain #1107

wants to merge 1 commit into
base: feature/grab_mouse


None yet
2 participants

victorlevasseur commented Jun 21, 2016

Small fix for #614

This PR includes a commit that fixes cursor not being grabbed again (happening quite often) after a focus gain on Linux (with X11). The fix consists in repeating the grab process up to 5 times (defined in a constant in the private namespace of the file). Between each attempt, a small sleep is inserted (50 ms).

Still some questions : maybe 5 attempts is a bit too much, but it should not happen very often (The mouse is effectively grabbed on the first or second attempt almost everytime on my computer).

(It's also almost like SDL is doing it, except that they use an infinite loop !)

@victorlevasseur victorlevasseur referenced this pull request Jun 21, 2016


Feature/grab mouse #614

3 of 5 tasks complete

@mantognini mantognini self-assigned this Jun 22, 2016

@mantognini mantognini added this to the 2.4 milestone Jun 22, 2016


This comment has been minimized.

Show comment
Hide comment

mantognini Jun 22, 2016


Thanks, I've included it on #614 branch. (I just added two missing spaces: if⎵(.)


mantognini commented Jun 22, 2016

Thanks, I've included it on #614 branch. (I just added two missing spaces: if⎵(.)

@mantognini mantognini closed this Jun 22, 2016

@mantognini mantognini added s:superseded and removed s:accepted labels Aug 5, 2016

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