Really ? I’m just fine with my 20 fps scene, I can toggle fullscreen and windowed in a blink.
If you want to compile Panda yourself, all you need is calling SetFocus(_hWnd); to get the keyboard focus back. I did a quick fix by hijacking foreground properties, which I think responsible for this. I inserted it here :
WinGraphicsWindow::set_properties_now
if (properties.has_foreground() && properties.get_foreground())
{
SetFocus(_hWnd); // <----- YNJH
if (!SetActiveWindow(_hWnd))
{
windisplay_cat.warning() << "SetForegroundWindow() failed!\n";
}
else
{
_properties.set_foreground(true);
}
properties.clear_foreground();
}
So to restore keyboard focus, you just need to request a foreground :
def onPandaWindowGetFocus(self, e):
props=WindowProperties()
props.setForeground(1)
base.win.requestProperties(props)
print 'KEYB FOCUS IS BACK !!'