merge 1.3 r843:844 into trunk

This commit is contained in:
Nick Bolton 2011-01-17 00:41:14 +00:00
parent 47e12f465b
commit 728e8bb035
7 changed files with 21 additions and 9 deletions

View File

@ -34,6 +34,10 @@ CArchAppUtilUnix::parseArg(const int& argc, const char* const* argv, int& i)
app().argsBase().m_display = argv[++i]; app().argsBase().m_display = argv[++i];
} }
else if (app().isArg(i, argc, argv, NULL, "--disable-xinitthreads")) {
app().argsBase().m_disableXInitThreads = true;
}
else { else {
// option not supported here // option not supported here
return false; return false;

View File

@ -80,7 +80,7 @@
CXWindowsScreen* CXWindowsScreen::s_screen = NULL; CXWindowsScreen* CXWindowsScreen::s_screen = NULL;
CXWindowsScreen::CXWindowsScreen(const char* displayName, bool isPrimary, int mouseScrollDelta) : CXWindowsScreen::CXWindowsScreen(const char* displayName, bool isPrimary, bool disableXInitThreads, int mouseScrollDelta) :
m_isPrimary(isPrimary), m_isPrimary(isPrimary),
m_mouseScrollDelta(mouseScrollDelta), m_mouseScrollDelta(mouseScrollDelta),
m_display(NULL), m_display(NULL),
@ -109,12 +109,11 @@ CXWindowsScreen::CXWindowsScreen(const char* displayName, bool isPrimary, int mo
if (mouseScrollDelta==0) m_mouseScrollDelta=120; if (mouseScrollDelta==0) m_mouseScrollDelta=120;
s_screen = this; s_screen = this;
// initializes Xlib support for concurrent threads. if (!disableXInitThreads) {
if (XInitThreads() == 0) // initializes Xlib support for concurrent threads.
{ if (XInitThreads() == 0)
throw XArch("XInitThreads() returned zero"); throw XArch("XInitThreads() returned zero");
} }
// set the X I/O error handler so we catch the display disconnecting // set the X I/O error handler so we catch the display disconnecting
XSetIOErrorHandler(&CXWindowsScreen::ioErrorHandler); XSetIOErrorHandler(&CXWindowsScreen::ioErrorHandler);

View File

@ -34,7 +34,7 @@ class CXWindowsScreenSaver;
//! Implementation of IPlatformScreen for X11 //! Implementation of IPlatformScreen for X11
class CXWindowsScreen : public CPlatformScreen { class CXWindowsScreen : public CPlatformScreen {
public: public:
CXWindowsScreen(const char* displayName, bool isPrimary, int mouseScrollDelta=0); CXWindowsScreen(const char* displayName, bool isPrimary, bool disableXInitThreads, int mouseScrollDelta=0);
virtual ~CXWindowsScreen(); virtual ~CXWindowsScreen();
//! @name manipulators //! @name manipulators

View File

@ -58,6 +58,9 @@ m_pauseOnExit(false),
#else #else
m_daemon(true), // backward compatibility for unix (daemon by default) m_daemon(true), // backward compatibility for unix (daemon by default)
#endif #endif
#if WINAPI_XWINDOWS
m_disableXInitThreads(false),
#endif
m_backend(false), m_backend(false),
m_restartable(true), m_restartable(true),
m_noHooks(false), m_noHooks(false),

View File

@ -49,6 +49,9 @@ public:
bool m_relaunchMode; bool m_relaunchMode;
bool m_debugServiceWait; bool m_debugServiceWait;
bool m_pauseOnExit; bool m_pauseOnExit;
#endif
#if WINAPI_XWINDOWS
bool m_disableXInitThreads;
#endif #endif
}; };

View File

@ -220,7 +220,9 @@ CClientApp::createScreen()
#if WINAPI_MSWINDOWS #if WINAPI_MSWINDOWS
return new CScreen(new CMSWindowsScreen(false, args().m_noHooks)); return new CScreen(new CMSWindowsScreen(false, args().m_noHooks));
#elif WINAPI_XWINDOWS #elif WINAPI_XWINDOWS
return new CScreen(new CXWindowsScreen(args().m_display, false, args().m_yscroll)); return new CScreen(new CXWindowsScreen(
args().m_display, false, args().m_disableXInitThreads,
args().m_yscroll));
#elif WINAPI_CARBON #elif WINAPI_CARBON
return new CScreen(new COSXScreen(false)); return new CScreen(new COSXScreen(false));
#endif #endif

View File

@ -639,7 +639,8 @@ CServerApp::createScreen()
#if WINAPI_MSWINDOWS #if WINAPI_MSWINDOWS
return new CScreen(new CMSWindowsScreen(true, args().m_noHooks)); return new CScreen(new CMSWindowsScreen(true, args().m_noHooks));
#elif WINAPI_XWINDOWS #elif WINAPI_XWINDOWS
return new CScreen(new CXWindowsScreen(args().m_display, true)); return new CScreen(new CXWindowsScreen(
args().m_display, true, args().m_disableXInitThreads));
#elif WINAPI_CARBON #elif WINAPI_CARBON
return new CScreen(new COSXScreen(true)); return new CScreen(new COSXScreen(true));
#endif #endif