Bug 1299707 - Disable XInput2 without MOZ_USE_USE_XINPUT2 on content process. r?acomminos
Actually, we don't turn of xinput2 on content process. So, although chrome process cannot detect touch screen device, content process can detect it.
So if we turn off xinput2 on chrome process, content process should be turned off.
MozReview-Commit-ID: 1kfsDBpqhC1
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -496,16 +496,24 @@ XRE_InitChildProcess(int aArgc,
XInitThreads();
#endif
#if MOZ_WIDGET_GTK == 2
XRE_GlibInit();
#endif
#ifdef MOZ_WIDGET_GTK
// Setting the name here avoids the need to pass this through to gtk_init().
g_set_prgname(aArgv[0]);
+
+#if MOZ_WIDGET_GTK == 3 && defined(MOZ_X11)
+ // Disable XInput2 support due to focus bugginess. See bugs 1182700, 1170342.
+ const char* useXI2 = PR_GetEnv("MOZ_USE_XINPUT2");
+ if (!useXI2 || (*useXI2 == '0')) {
+ gdk_disable_multidevice();
+ }
+#endif
#endif
#ifdef OS_POSIX
if (PR_GetEnv("MOZ_DEBUG_CHILD_PROCESS") ||
PR_GetEnv("MOZ_DEBUG_CHILD_PAUSE")) {
printf_stderr("\n\nCHILDCHILDCHILDCHILD\n debug me @ %d\n\n",
base::GetCurrentProcId());
sleep(30);