Mouse still visible on windows 11 Psychopy 2023.2.1

Dear All,

I try to make the mouse invisible 3 methods find online but not worked !!!.

but nothing works

here is my part of code.

    mywin=visual.Window(monitor='HP',size=(800,600),color=-1,waitBlanking=True,units="pix",screen=1,fullscr=False,allowGUI=False)
    mywin.mouseVisible = False
    mouse=event.Mouse(win=mywin,visible=False)
    mouse.setVisible(0)

Thanks for your help

JFK

I find a way, but it is not elegant I call mywin.mouseVisible = False mutliple times in my scripts

it is like this informations some time is reset.

Best

Hello,

we also have this issue in my lab, running Windows 10 with PsychoPy 2023.2.2
We have a single-screen setup and installed PsychoPy with the provided installer.
This problem wasn’t there with the previous PsychoPy version we used (2022.2.2)

So far, the solution we found is to call win.mouseVisible = False after every flip, but this is an unoptimal solution.

We’ve tested a bit more now, and this issue appeared with version 2023.2.0 (so the last version without this issue is 2023.1.3).
We’re using the pyglet backend to create the window.

We’ve found two solutions to hide the mouse:

  1. Downgrade to 2023.1.3
  2. Use “mouse.setExclusive(True)” which is fine for us since we don’t need the mouse at all.

Hi Just hit this problem with v2023.2.3 and it really doesnt like option 2.

Anyone been able to fix this?

Thanks
Philip.

For reasons I dont understand it now is checking the screen frame rate every time it runs my experiment.
It also seems pretty keen on creating something called window1 and keeps spitting out

window1: mouseVisible = True

I dont seem to be able to access window1 to switch its mouse off

Hello, MartinConstant. The reason why the mouse pointer is always visible may be as follows: When your program doesn’t have a window, the considerate Psychopy will automatically create a temporary window1 for you. Unfortunately, the function used to make this window may have a default parameter, allowGUI=True. If the window was initialized with allowGUI=True, then the mouse is initially set to visible.

I hope this information can help you solve this long-standing issue.

Thanks for responding Martin

Not fully understanding this but as far as I can tell
it automatically generates this code
Capture

and so somewhere else it creates window1 but I have no way of finding out where this occurs?

Any help greatefully received.

Philip.

Hi Sorry but this problem persists and I would be keen to solve it - any help anyone???

I think it needs a bug fix (currently in progress). If you need it urgently try setting the version to 2023.1.4

Just submitted a PR to fix this: BF: hide that visible mouse, please by mh105 · Pull Request #6465 · psychopy/psychopy · GitHub

1 Like

This is great! Which version of psychopy will this be a part of? 24.1.5 maybe?

Yeah next release will have this fixed.

2 Likes

This turned out to be a double hit. There’s a separate problem that is causing the mouse to stay visible on Windows OS using the pyglet backend. Just submitted a PR to fix this second issue as well: BF: hide that visible mouse and retain window focus with pyglet backend on Windows OS by mh105 · Pull Request #6874 · psychopy/psychopy · GitHub. Hopefully this is the end of visible mouse.