GLX: Remove evdpy / dpy split

Move to one display. There's no reason to have two displays here -- the
comment stated that one should touch GLX and one should touch window
events, and that they should be touched from different threads, but the
current code wasn't this careful.

Just use one Display connection.
This commit is contained in:
Jasper St. Pierre 2014-08-05 23:44:25 -04:00
parent 12f073c56b
commit e3a9ba30e3
3 changed files with 15 additions and 19 deletions

View file

@ -15,7 +15,7 @@ static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
// Show the current FPS
void cInterfaceGLX::UpdateFPSDisplay(const std::string& text)
{
XStoreName(GLWin.evdpy, GLWin.win, text.c_str());
XStoreName(GLWin.dpy, GLWin.win, text.c_str());
}
void cInterfaceGLX::SwapInterval(int Interval)
@ -65,7 +65,6 @@ bool cInterfaceGLX::Create(void *&window_handle)
None };
GLWin.dpy = XOpenDisplay(nullptr);
GLWin.evdpy = XOpenDisplay(nullptr);
GLWin.parent = (Window)window_handle;
GLWin.screen = DefaultScreen(GLWin.dpy);
if (GLWin.parent == 0)
@ -134,7 +133,6 @@ void cInterfaceGLX::Shutdown()
{
glXDestroyContext(GLWin.dpy, GLWin.ctx);
XCloseDisplay(GLWin.dpy);
XCloseDisplay(GLWin.evdpy);
GLWin.ctx = nullptr;
}
}