[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] can't grab the input while fullscreen on macosX10.4
- To: pygame-users@xxxxxxxx
- Subject: [pygame] can't grab the input while fullscreen on macosX10.4
- From: Mikel Izal <mikel.izal@xxxxxxxxx>
- Date: Tue, 31 May 2005 21:46:45 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 31 May 2005 15:45:16 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=mlD6RehgZ1uTevOhv0vB61eBbAK/PvGNSc6QJQmS5lJw5lBxNYzK1F5FBcW5O5Y4D6PyvGZYiB6fiFLr9rHGRAMb64BMZgYfFV0ef+FESyYGauc9YFz/sQEqaH8bj62dQ3pvqJb9ZDyvvIT+vlBFdsxugBaSews2+X1f+EDMWpo=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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 :-)