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

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



On Thu, 2002-05-09 at 17:04, Pete Shinners wrote:
> 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?

well, when i trigger toggle_fullscreen() via my remote, even if the
mouse cursor is on my monitor, the mouse cursor will be "captured" by
the tv screen. you are right,some kind of grabbing seems to be going on.

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

good idea. unfortunatly it did not make any difference.

 
> 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 am not using set_visible at all.

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

nope. iconify() seems to have no effect in full screen mode at all.

I am thinking that maybe I don't even need a full screen mode, maybe i
don't even need a window manager. i just need to make sure my window
takes all the available space and positions itself in the upper left
corner... 


Andreas


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