Skip to content

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

Merged
peircej merged 2 commits intopsychopy:masterfrom
suddhasourav:ENH_BF_setMouseExclusivityPyglet
May 6, 2015
Merged

Function to set mouse exclusivity for a window in Pyglet#898
peircej merged 2 commits intopsychopy:masterfrom
suddhasourav:ENH_BF_setMouseExclusivityPyglet

Conversation

@suddhasourav
Copy link
Contributor

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

Coverage Status

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

@suddhasourav
Copy link
Contributor Author

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

@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

@peircej
Copy link
Member

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)
?

@peircej
Copy link
Member

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)

@suddhasourav
Copy link
Contributor Author

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

@coveralls
Copy link

Coverage Status

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

peircej added a commit that referenced this pull request 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
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.

3 participants