summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 00:07:02 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 00:07:02 +0000
commit08c1fe3eef8f4a6153e6be3aed6adcb72969d2dd (patch)
treefdfe133d264e9933cf2be993b455c394ba51a043 /chrome/plugin
parentfbd17cf5288dec78851ada15fadfda0563419833 (diff)
downloadchromium_src-08c1fe3eef8f4a6153e6be3aed6adcb72969d2dd.zip
chromium_src-08c1fe3eef8f4a6153e6be3aed6adcb72969d2dd.tar.gz
chromium_src-08c1fe3eef8f4a6153e6be3aed6adcb72969d2dd.tar.bz2
linux: reset GDK_NATIVE_WINDOWS, fixing clicking on flash again
Even though we set this environment variable, GTK clears it after initializing itself from it, with the intent of isolating the variable's value to just this process. If nspluginwrapper is involved, though, we want to propagate the variable to its child as well. So we must set the variable both before initialization (to initialize it for the current process) as well as after (to initialize it for the child process, if any). Review URL: http://codereview.chromium.org/1789008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_thread.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 688fe91..fb24e3f 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -69,6 +69,12 @@ PluginThread::PluginThread()
setenv("GDK_NATIVE_WINDOWS", "1", 1);
gtk_init(&argc, &argv_pointer);
+
+ // GTK after 2.18 resets the environment variable. But if we're using
+ // nspluginwrapper, that means it'll spawn its subprocess without the
+ // environment variable! So set it again.
+ setenv("GDK_NATIVE_WINDOWS", "1", 1);
+
for (size_t i = 0; i < args.size(); ++i) {
free(argv[i]);
}