summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/cross/o3d_glue.h
diff options
context:
space:
mode:
authortschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-20 19:13:00 +0000
committertschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-20 19:13:00 +0000
commited0ea691fc4b2fa9a54faded95d3153847597bcb (patch)
tree9e63778043ee73dc1805a9828971aa9dcb1a22b1 /o3d/plugin/cross/o3d_glue.h
parent6b7624085b86448683e25006558a4e5b9c02bd66 (diff)
downloadchromium_src-ed0ea691fc4b2fa9a54faded95d3153847597bcb.zip
chromium_src-ed0ea691fc4b2fa9a54faded95d3153847597bcb.tar.gz
chromium_src-ed0ea691fc4b2fa9a54faded95d3153847597bcb.tar.bz2
Linux: fix crash in Firefox at plugin unload time when more than one O3D instance is running. The problem here was that Firefox has a bug where closing a tab actually deletes the parent windows of the plugin _before_ calling NPP_Destroy(), and Gtk recursively destroys all children automatically. Hence, once NPP_Destroy() runs our X11 Window handle is already invalid. If there is another O3D instance running in the same browser process, then performing the TearDown() call requires a MakeCurrent() call on the Window handle, which will fail with GLXBadDrawable and kill the browser. The solution requires two things. First, to avoid Gtk recursively destroying the children, we explicitly open a separate X11 connection for our GtkPlug, which means a destroy on the parents does not automatically propagate to the children because it has to go through the X server first. Second, we register a callback with our GtkPlug to handle this event from the X server by turning our GtkPlug into a hidden unparented window rather than destroying it.
Unrelatedly, also make fullscreen windows be set_keep_above and fix some spurious unref() calls (which produced warnings but otherwise were mostly harmless). TEST=opening and closing concurrent ping pong windows in FF and Chrome (64-bit) Review URL: http://codereview.chromium.org/553028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin/cross/o3d_glue.h')
-rw-r--r--o3d/plugin/cross/o3d_glue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/o3d/plugin/cross/o3d_glue.h b/o3d/plugin/cross/o3d_glue.h
index 2375173..d732c13 100644
--- a/o3d/plugin/cross/o3d_glue.h
+++ b/o3d/plugin/cross/o3d_glue.h
@@ -291,6 +291,7 @@ class PluginObject: public NPObject {
// XEmbed mode
Window drawable_;
+ GdkDisplay *gdk_display_;
GtkWidget *gtk_container_;
GtkWidget *gtk_fullscreen_container_;
GtkWidget *gtk_event_source_;