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

Function to set mouse exclusivity for a window in Pyglet #898

Merged

Conversation

@suddhasourav
Copy link
Contributor

@suddhasourav suddhasourav commented May 6, 2015

This function binds the mouse to a window (and makes the cursor invisible). The use-case would be a multi-monitor setting where the participants need to click to respond. Without using a function like this, the cursor can be moved out of the region of the experiment.

@coveralls
Copy link

@coveralls coveralls commented May 6, 2015

Coverage Status

Coverage decreased (-0.01%) to 50.54% when pulling f0f6bb9 on suddhasourav:ENH_BF_setMouseExclusivityPyglet into 34020c3 on psychopy:master.

Loading

@suddhasourav
Copy link
Contributor Author

@suddhasourav suddhasourav commented May 6, 2015

I wonder why coveralls is throwing an error here... should I add a test function?

Loading

@coveralls
Copy link

@coveralls coveralls commented May 6, 2015

Coverage Status

Coverage decreased (-0.01%) to 50.54% when pulling f0f6bb9 on suddhasourav:ENH_BF_setMouseExclusivityPyglet into 34020c3 on psychopy:master.

Loading

@coveralls
Copy link

@coveralls coveralls commented May 6, 2015

Coverage Status

Coverage decreased (-0.01%) to 50.54% when pulling f0f6bb9 on suddhasourav:ENH_BF_setMouseExclusivityPyglet into 34020c3 on psychopy:master.

Loading

@peircej
Copy link
Member

@peircej peircej commented May 6, 2015

We do get some non-deterministic fails on occasion, but this looks fine. Very minor thing: I wonder if the name might be just:
mouse.setExclusive(True)
rather than:
mouse.setMouseExclusivity(True)
?

Loading

@peircej
Copy link
Member

@peircej peircej commented May 6, 2015

(if you push a change and submit a pull request this one will be updated - no need to close and reopen it)

Loading

@suddhasourav
Copy link
Contributor Author

@suddhasourav suddhasourav commented May 6, 2015

I agree - it's already a method of Mouse. Changed accordingly!

Loading

@coveralls
Copy link

@coveralls coveralls commented May 6, 2015

Coverage Status

Coverage decreased (-0.01%) to 50.53% when pulling a134f48 on suddhasourav:ENH_BF_setMouseExclusivityPyglet into 34020c3 on psychopy:master.

Loading

peircej added a commit that referenced this issue May 6, 2015
…yglet

Function to set mouse exclusivity for a window in Pyglet
@peircej peircej merged commit 1d27a81 into psychopy:master May 6, 2015
1 of 2 checks passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants