[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] can't grab the input while fullscreen on macosX10.4




Hello

I have this problem using pygame (1.7.0) fullscreen on Mac OS X (10.4). Even if I set the cursor not visible and call get_grab(), I cannot efectively grab the input. The cursor remains invisible but looks stoped at the screen edges and relative positions are returned as 0s.
I have tried to grab the input directly with a C program using SDL and it works
I have build pygame from CVS and still it fails. Looks like the call to SDL_WM_GrabInput(SDL_GRAB_ON) on event.c has no effect. If I print the result of DL_WM_GrabInput(SDL_GRAB_QUERY) just after that line it says it has not grabbed input.


Can someone please provide some help? or at least confirm that it works on tiger?

This is the code I use to set a fullscreen grabbed invisible cursor
------------------------------------------
pygame.init()
pygame.display.init()

print "get_grab() 1 returns "+str(pygame.event.get_grab())

pygame.display.set_mode((800,600),OPENGL | DOUBLEBUF | FULLSCREEN)
pygame.mouse.set_visible(False)
pygame.event.set_grab(True)

print "get_grab() 2 returns "+str(pygame.event.get_grab())
-------------------------------------------

Without the the FULLSCREEN option it works. The second set_grab() returns 1 and I can get mouse relative values forever without reaching the screen edge
With the FULLSCREEN option the second set_grab() returns 0 and the invisible cursor stops when reaches screen edge



I can reproduce it also with the program eventlist.py in the pygame Examples directory. Adding the flag FULLSCREEN at the set_mode call. On mac os 10.3 I can get the grab light green on window or fullscreen. On 10.4 I can only grab if not fullscreen



What more can I try?

Thanks for any help  :-)