[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] mouse cursor locked in dual head fullscreen setup



Andreas Leitner wrote:
> Now, when my pygame app on Screen B goes into fullscreen mode, it locks
> the mouse cursor to Screen B. I am no longer to control my workstation
> part of the computer anymore.
> 
> Is there a way to release the cursor from within pygame? Is there a
> different solution?

hmm, this is tricky. i'm guessing when you run fullscreen SDL must be 
automatically grabbing the cursor? i'm also wondering if you are calling 
anything to hide the cursor?

i'd start with a call to 'pygame.event.set_grab(0)'. that might just do 
it for you. perhaps even calling 'pygame.event.get_grab()' before that, 
to see if SDL thinks it already has grabbed all input?

make sure you aren't calling 'pygame.mouse.set_visible(0)'. usually this 
only effects the mouse when it is 'on' the pygame window, but perhaps 
when fullscreen SDL makes it a little more hidden?

i'd say for the most part this might require a trip into the SDL code? 
i'm guessing it's doing something that just takes over the mouse and 
keyboard, even though it might not need to.

if you call pygame.display.iconify(), do you get the mouse and control back?


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org