> On Nov 19, 2017, at 8:44 PM, Noel Garwick <noel.garw...@gmail.com> wrote: > > If you tie it to something other than a print statement, are you still seeing > a delay?
Yes. The print statement was a simplification. I noticed this problem in code that I have written for a Button object which shows different states (images) of a button. I noticed that the first click on a button worked fine, but the second click showed the down state (reacting to the MOUSEBUTTONDOWN event) for a long time before showing the up state (reacting to the MOUSEBUTTONUP event) again. > > And maybe this is a dumb question, but are you using the same mouse when you > test on Windows and OSX? Just to rule out anything physically different with > the mouse... Not a dumb question at all. I just took the mouse off my PC (where I did not se the problem), and plugged into my Mac. I still see the delay on the Mac, Thanks for asking. Irv > > On Sun, Nov 19, 2017 at 11:29 PM, Irv Kalb <i...@furrypants.com > <mailto:i...@furrypants.com>> wrote: > >> On Nov 18, 2017, at 11:28 PM, Ian Mallett <i...@geometrian.com >> <mailto:i...@geometrian.com>> wrote: >> >> Hi, >> >> FWIW I am unable to reproduce on Win 7 Pro, Py 3.5.1, PyGame 1.9.2a0 (to >> print the latter, `print(pygame.ver)`). >> >> The event system, like everything else, is really just a thin layer over >> SDL's—so for platform-specific issues in PyGame it's commonly the underlying >> SDL that's at fault. Notwithstanding that SDL is fairly well-tested, but Mac >> tends to be a lower priority for testing, on account of Apple making game >> development on OS X difficult in a variety of ways. My guess is that it's a >> minor hiccup in older SDL on MacOS that no one ever noticed before, >> additionally because MOUSEBUTTONUP is often ignored—in which case you're >> most likely to get closure from the SDL community, unless someone here feels >> like C spelunking. >> >> Maybe `pygame.event.clear()` would trick the event system into behaving >> better on startup? >> >> Ian > > > Thanks for the suggestion. I did try adding a call to event.clear() after my > for loop where I check for events, but there was no change. I also tried > event.pump(), and I'm still seeing the delay. > > And thanks for letting me know how to check the version of pygmae. I am > running 1.9.3 > > I also checked in on my Windows system, and I cannot reproduce it there > either. > > One other thing I just found out. Even if I start the program running (on my > Mac), and wait for a while before the first click, (maybe 2 to 3 seconds), > again the first click goes through just fine, but the second click shows the > MOUSEBUTTONDOWN right away, but the matching MOUSEBUTTONUP still delays from > 1 to 3 seconds. Definitely strange. > > Irv > >