Ok you were right. Here is the summary: with Linux: pygame.event.set_grab() pygame.mouse.set_visible() :
grab => False, visible => False => "virtual input" mode grab => True, visible => False => "virtual input" mode grab => False, visible => True => normal mode grab => True, visible => True => normal mode So as long as the mouse is not visible, it's considered "virtual input" mode I'm pretty sure this is a bug. I hope someone will try this my code under Linux and tell me if it's the same problem or not. You cant get the whole sourcecode here: http://olivierpons.com/einstein.tar.bz2 By the way, Enigma (the only fullscreen SDL game I've tested under Linux) has exactly the same problem. On 21 juil, 05:36, Brian Fisher <[email protected]> wrote: > The only time I know of where that maybe is supposed to happen, is when the > mouse is both grabbed by the window, and invisible. SDL takes that to mean > you want "virtual input" mode, where the mouse is moved back to the center > so you can keep getting relative mouse movement infinitely in all > directions, so it can behave like a trackball. This is documented > here:http://www.pygame.org/docs/ref/mouse.html > > If this is your case. and relative mouse movement is fine, try using the > mouse event's .rel member instead of it's .pos member, or using > pygame.mouse.get_rel instead of .get_pos > > if this is your case, but virtual input is not desireable, reconsider > whether pygame.event.set_grab(true) and pygame.mouse.set_visible(false) are > actually functions you want to call. > > if this is not your case, it's a bug, and a minimal sample to reproduce > would be appreciated. > > > > On Tue, Jul 20, 2010 at 2:32 PM, SurferIX <[email protected]> wrote: > > Hi! > > > I've got a problem with the mouse: it's going back to the center of > > the screen! > > I don't know where it could come from because it does this only in > > full screen. > > It's exactly the same problem with the game Enigma. > > > It seems there's a problem either with SDL or with my computer. But if > > it's with my computer why only in full screen? > > Did you have any trouble like that? > > Thanks a lot!
