Mac 10.9 window focus issue running the examples

You might be able to install the command-line tools without installing XCode entirely. That would be fine.

I hope I’m not necroing here, but I am also having this issue as the original poster, running OSX 10.9.1.

Unfortunately, unlike the original poster, the issue is not resolved by using the special build of 1.9.0 provided by user rdb. That version simply creates a new error, indicating that no valid displays are named in the config file. I checked the config file, and it does include an uncommented line;

load-display pandagl

I’ve also tried 1.81, 1.91, 2.00, and 2.04, to no avail; all keypresses fall through to the terminal that invoked the example, producing these symbols;

^[[D^[[C^[[A^[[D^[[C^[[A^[[D^[[C^[[A^[[D^[[C^[[A^[[D^[[C^[[A^[[D^C*

If I change focus to another window, and then back to the example, focus is then given to whichever other window I clicked. For example, the arrow keys will navigate through a finder window instead of influencing a terminal window. I updated to 10.9.2, and am still facing the same issue.

I even tried making the files executable .command files and also running them directly through the python binary via the finder, and in those cases keypresses still fell through to the terminal and Finder, respectively. Mouse-based examples fare much better, though there’s a bit of a precision issue (which can be dealt with later.)

Console output when I launch an example;

4/19/14 12:26:19.807 PM WindowServer[120]: Received display connect changed for display 0x4280882
4/19/14 12:26:19.831 PM WindowServer[120]: Found 62 modes for display 0x04280882 [36, 26]
4/19/14 12:26:19.884 PM WindowServer[120]: Received display connect changed for display 0x3f003f
4/19/14 12:26:19.884 PM WindowServer[120]: Found 1 modes for display 0x003f003f [1, 0]
4/19/14 12:26:19.885 PM WindowServer[120]: Received display connect changed for display 0x3f0040
4/19/14 12:26:19.885 PM WindowServer[120]: Found 1 modes for display 0x003f0040 [1, 0]
4/19/14 12:26:19.885 PM WindowServer[120]: Received display connect changed for display 0x3f0041
4/19/14 12:26:19.885 PM WindowServer[120]: Found 1 modes for display 0x003f0041 [1, 0]
4/19/14 12:26:19.887 PM WindowServer[120]: CGXMuxAcknowledge: Posting glitchless acknowledge
4/19/14 12:26:19.901 PM WindowServer[120]: MPAccessSurfaceForDisplayDevice: Set up page flip mode on display 0x04280882 device: 0x7fc0fb80bd90  isBackBuffered: 0 numComp: 1 numDisp: 3
4/19/14 12:26:19.932 PM WindowServer[120]: Received display connect changed for display 0x4280882
4/19/14 12:26:19.932 PM WindowServer[120]: Found 1 modes for display 0x04280882 [1, 0]

(Not one line of which seems to address input.)

Any idea what’s going on or how I can fix this? Thanks.

Are there any other errors shown when you use my build? “No valid displays named” would in this case probably follow an error where it failed to load libpandagl, so I’d like to know why it can’t load that.

I was having the focus issue described upthread, and tried the 1.9.0 build rdb provided. I then encountered the same issue dim3wit described. Here is the error I was getting:


Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "testpan.py", line 41, in <module>
    Game().run()
  File "testpan.py", line 6, in __init__
    ShowBase.__init__(self)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 245, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 888, in openDefaultWindow
    self.openMainWindow(*args, **kw)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 924, in openMainWindow
    self.openWindow(*args, **kw)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 638, in openWindow
    win = func()
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 624, in <lambda>
    callbackWindowDict = callbackWindowDict)
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 690, in _doOpenWindow
    self.makeDefaultPipe()
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 528, in makeDefaultPipe
    "No graphics pipe is available!\n"
  File "/Developer/Panda3D/direct/directnotify/Notifier.py", line 136, in error
    raise exception(errorString)
StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

The empty space at the top was from a print I added to ShowBase.py to print out the config value for “load-display”. Because it was blank, my thought was that the Config.prc file was not being loaded. I was able to work around this by exporting PRC_DIR=/Developer/Panda3D/etc (you can also specify it on the same line as your python command, e.g. PRC_DIR=/Developer/Panda3D/etc python mygame.py). Setting this variable seems to have fixed the graphics pipe issue, and the 1.9.0 build seems to fix the the focus issue.

Hi, I had the same issue of the original poster and I’ve tried the 1.9.0 build but I’m having the error (similar to theJenix) that said:

StandardError: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display

Then I tried to run the command like this as suggested:
PRC_DIR=/Developer/Panda3D/etc python mygame.py

and now all seems to work, no more errors and the focus is on the game windows.

My question is is there a way to permanently specify the PRC_DIR, instead of specify it every time in the command line?
Thanks for all advice.

You can set it in your .bashrc or .bash_profile file in your home directory. Put “export PRC_DIR=/Developer/Panda3D/etc” in that file.

It works! I’m new to Mac and I didn’t know if this kind of stuff works like an ordinary Linux distribution. Thanks for the support.