AndrewZ
Posts: 5
Joined: Mon Jun 20, 2016 4:40 am

Mouse Cursor Stuck in Lower Left in PyGame Fullscreen

Mon Jun 20, 2016 4:49 am

I've only been working with PyGame and the touchscreen for a couple days, and I've hit something frustrating in my experiments tonight. Previously I wasn't going fullscreen with PyGame, just a nearly fullscreen window. Things worked great, tapping in my zones got the right inputs into code, my program behaved the way I expected, all was well. So I added a keyboard button to quit the program if needed, and bravely went fullscreen, and that's when my problems began...

When in fullscreen mode the first two taps on the screen register correctly, but the third and all subsequent taps register at 799, 479, or the lower right corner of the display.

Also worth noting is that this doesn't happen when the mouse cursor is visible, only when I hide the mouse cursor with

Code: Select all

pygame.mouse.set_visible(False)
.

Have I run into some strange bug with PyGame and the Office Foundation Display, or is something else going on?

AndrewZ
Posts: 5
Joined: Mon Jun 20, 2016 4:40 am

Re: Mouse Cursor Stuck in Lower Left in PyGame Fullscreen

Mon Jun 20, 2016 2:48 pm

For now my work around is setting a very small mouse cursor.

Code: Select all

pygame.mouse.set_visible(True)
pygame.mouse.set_cursor((8, 8), (4, 4), (24, 24, 24, 231, 231, 24, 24, 24), (0, 0, 0, 0, 0, 0, 0, 0))
Not ideal, but close enough for now.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Mouse Cursor Stuck in Lower Left in PyGame Fullscreen

Tue Aug 02, 2016 11:56 am

Hi,
would you be able to post some same code?
I have this problem, and I see that a lot of others have too. When you mention 'fullscreen' or not, are you working within X-Windows?
thanks,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

AndrewZ
Posts: 5
Joined: Mon Jun 20, 2016 4:40 am

Re: Mouse Cursor Stuck in Lower Left in PyGame Fullscreen

Wed Nov 23, 2016 12:17 am

Here's My Code for review. It's been a while since I worked on it, but it runs full screen under Xwindows.

Return to “Official Foundation Display”