Hi.
As you may know if you follow my post, my application display a panda window inside a gtk interface.
that being said, if, when the window open, I’m in fullscreen on a multiple screen desktop ( which mean that only one screen is used for the fullscreen)
I get this error:
:display:windisplay(warning): SetForegroundWindow() failed!
:display:wgldisplay(error): SetPixelFormat(56) failed after window create
the window is not created and the application crash.
the code that create that is
props = WindowProperties().getDefault()
request = self.parent_window.widget.get_allocation()
props.setSize(request.width, request.height)
props.clearParentWindow()
props.setOrigin(0, 0)
props.setParentWindow(get_widget_id(self.parent_window.widget))
props.setTitle(self.app_name+'_panda')
base.win.getGsg().getEngine().removeWindow(base.win)
base.openDefaultWindow(props=props)
I’m not setting it to fullscreen since it 's the gtk window that is fullscreen, the panda window has a fixed size inside that window.
note that if I create the program not in fullscreen and stich to fullscren after I use this code and there are no error:
if not self.parent_window: return
request = self.parent_window.widget.get_allocation()
props = WindowProperties().getDefault()
props.setOrigin(0, 0)
props.setSize(request.width, request.height)
props.setTitle(self.app_name+'_panda')
base.win.requestProperties(props)
I’ve check the size, it can be the same for working case and non-working case ( depending on the resolution), and the id for the setParentWindow can be the same too.
The bug don’t occurs on pandadx9 only in pandagl.
I’ve got a nvidia 8800gt ( tested with a 6600gt and a 9600gt too)
Confirmed with different nvidia drivers and card and on XP, vista and seven.
- pandagl
- multiple screen box
- fulscreen gtk application
–> wgldisplay error
I can’t see where that come from outside some strange code in pandagl or the nvidia drivers…
does the SetPixelFormat(56) inspire someone ?