From c43d6a969f7bf0a7fd8af01df9feff2785fdb242 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 31 Aug 2011 20:52:30 +0000 Subject: [PATCH] twirl on old x11 browsers too --- direct/src/plugin_npapi/ppInstance.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index 402e1d10f5..ff19f6441a 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -2958,7 +2958,16 @@ x11_twirl_subprocess_run() { unsigned long attrib_mask = CWBackPixel | CWBorderPixel | CWEventMask; - X11_Window parent = GDK_DRAWABLE_XID(_plug->window); + X11_Window parent = 0; + if (_use_xembed) { +#ifdef HAVE_GTK + assert(_plug != NULL); + parent = GDK_DRAWABLE_XID(_plug->window); +#endif // HAVE_GTK + } else { + parent = (X11_Window)(_window.window); + } + X11_Window window = XCreateWindow (display, parent, 0, 0, _window.width, _window.height, 0, depth, InputOutput, dvisual, attrib_mask, &wa);