1diff --git a/.gitignore b/.gitignore 2index d6c5c502b..d22bff565 100644 3--- a/.gitignore 4+++ b/.gitignore 5@@ -8,3 +8,4 @@ 6 !.editorconfig 7 !.travis.yml 8 !.github 9+/build/ 10\ No newline at end of file 11diff --git a/framework/platform/lnx/X11/tcuLnxX11.cpp b/framework/platform/lnx/X11/tcuLnxX11.cpp 12index dfe09d060..b4493e431 100644 13--- a/framework/platform/lnx/X11/tcuLnxX11.cpp 14+++ b/framework/platform/lnx/X11/tcuLnxX11.cpp 15@@ -24,6 +24,7 @@ 16 #include "tcuLnxX11.hpp" 17 #include "gluRenderConfig.hpp" 18 #include "deMemory.h" 19+#include "deThread.hpp" 20 21 #include <X11/Xutil.h> 22 23@@ -80,10 +81,14 @@ XlibDisplay::XlibDisplay (EventState& eventState, const char* name) 24 // a multi-threaded program calls, and it must complete before any other 25 // Xlib call is made. 26 DE_CHECK_RUNTIME_ERR(XInitThreads() != 0); 27- m_display = XOpenDisplay((char*)name); // Won't modify argument string. 28+ for (int i = 0; i < 10; i++) { 29+ m_display = XOpenDisplay((char*)name); // Won't modify argument string. 30+ if (m_display) 31+ break; 32+ deSleep(100*(1+i)); 33+ } 34 if (!m_display) 35 throw ResourceError("Failed to open display", name, __FILE__, __LINE__); 36- 37 m_deleteAtom = XInternAtom(m_display, "WM_DELETE_WINDOW", False); 38 } 39 40