From 5e863331b212dea40f9d5222608b9b55f3e4cc7b Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Fri, 20 Jan 2017 14:59:10 -0800 Subject: [PATCH] x11: Fix deadlock When waiting for a window's MapNotify event, drain only that window's event queue. Do NOT drain the global event queue, which includes all windows' events. Fixes deadlock in test 'dEQP-EGL.functional.multithread.window_context' on Mesa master@f57bdd48 with Intel Skylake. Change-Id: I8c7f2db6c145f59493cb7572b20c4799e9a2cd0a Depends-On: Ib3b535cec8295e062994fd759ae083c78641cf13 --- framework/platform/X11/tcuX11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/platform/X11/tcuX11.cpp b/framework/platform/X11/tcuX11.cpp index c60c95e..d58ef63 100644 --- a/framework/platform/X11/tcuX11.cpp +++ b/framework/platform/X11/tcuX11.cpp @@ -200,7 +200,7 @@ void Window::setVisibility (bool visible) do { - XNextEvent(dpy, &event); + XWindowEvent(dpy, m_window, ExposureMask | StructureNotifyMask, &event); } while (event.type != eventType); m_visible = visible; -- 2.7.4