Use descriptive names.

This commit is contained in:
Steve Checkoway
2006-12-07 13:00:30 +00:00
parent 0e38878528
commit 027b94d2c1
3 changed files with 7 additions and 7 deletions
@@ -32,7 +32,7 @@ static PWSWAPINTERVALEXTPROC glSwapInterval = NULL;
static LocalizedString FAILED_CONNECTION_XSERVER( "LowLevelWindow_X11", "Failed to establish a connection with the X server" ); static LocalizedString FAILED_CONNECTION_XSERVER( "LowLevelWindow_X11", "Failed to establish a connection with the X server" );
LowLevelWindow_X11::LowLevelWindow_X11() LowLevelWindow_X11::LowLevelWindow_X11()
{ {
if( !Go() ) if( !OpenXConnection() )
RageException::Throw( FAILED_CONNECTION_XSERVER.GetValue() ); RageException::Throw( FAILED_CONNECTION_XSERVER.GetValue() );
const int iScreen = DefaultScreen( Dpy ); const int iScreen = DefaultScreen( Dpy );
@@ -79,7 +79,7 @@ LowLevelWindow_X11::~LowLevelWindow_X11()
Win = None; Win = None;
XDestroyWindow( Dpy, g_AltWindow ); XDestroyWindow( Dpy, g_AltWindow );
g_AltWindow = None; g_AltWindow = None;
Stop(); // Xlib cleans up the window for us CloseXConnection();
} }
void *LowLevelWindow_X11::GetProcAddress( RString s ) void *LowLevelWindow_X11::GetProcAddress( RString s )
+2 -2
View File
@@ -11,7 +11,7 @@ Window X11Helper::Win = None;
static int ErrorCallback( Display*, XErrorEvent* ); static int ErrorCallback( Display*, XErrorEvent* );
static int FatalCallback( Display* ); static int FatalCallback( Display* );
bool X11Helper::Go() bool X11Helper::OpenXConnection()
{ {
if( g_iRefCount == 0 ) if( g_iRefCount == 0 )
{ {
@@ -26,7 +26,7 @@ bool X11Helper::Go()
return true; return true;
} }
void X11Helper::Stop() void X11Helper::CloseXConnection()
{ {
g_iRefCount--; g_iRefCount--;
+3 -3
View File
@@ -10,14 +10,14 @@ namespace X11Helper
// Create the connection, if necessary; otherwise do some important // Create the connection, if necessary; otherwise do some important
// internal session-tracking stuff (so you should call this anyway). // internal session-tracking stuff (so you should call this anyway).
bool Go(); bool OpenXConnection();
// Destroy the connection, if appropriate; otherwise do some important // Destroy the connection, if appropriate; otherwise do some important
// internal session-tracking stuff (so you should call it anyway). // internal session-tracking stuff (so you should call it anyway).
void Stop(); void CloseXConnection();
// The current Display (connection). Initialized by the first call to // The current Display (connection). Initialized by the first call to
// Go(). // OpenXConnection().
extern Display *Dpy; extern Display *Dpy;
// The Window used by LowLevelWindow_X11 as the main window. // The Window used by LowLevelWindow_X11 as the main window.