[PD-dev] found source of crazy focus bug

Hans-Christoph Steiner hans at at.or.at
Sun Nov 21 00:31:25 CET 2010

Hey all,

Miller and I have been banging our heads against the Mac OS X-only bug  
where the menubar would get focus and flash when you hit keys, but the  
key command wouldn't work or do anything else.  It turns out that it  
is caused by the 'grab' command in the ::pdwindow::busygrab proc.  If  
you comment that out, then this bug goes away. Odd that it only  
affects Mac OS X...

The grab function is used to put up the busy cursor when Pd is loading  
a patch, and it also locks the user out of trying to do things, like  
edit a patch, while 'pd' is busy trying to load the patch.  This works  
by forcing the focus to be on the Pd window while 'pd' is busy.  It  
seems to work like a charm on X11 and Windows, but on Mac OS X, it  
causes the new windows to not get the FocusIn message, and therefore  
not set itself up properly.

So now the question is how to fix this and retain the busy cursor  



News is what people want to keep hidden and everything else is  
publicity.          - Bill Moyers

More information about the Pd-dev mailing list