From 19cee712100017c2d9d10fcb7f5bdbda9e119026 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Thu, 7 Dec 2006 08:31:40 +0000 Subject: [PATCH] Return values not used. --- stepmania/src/archutils/Unix/X11Helper.cpp | 27 +++++++++------------- stepmania/src/archutils/Unix/X11Helper.h | 12 +++++----- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/stepmania/src/archutils/Unix/X11Helper.cpp b/stepmania/src/archutils/Unix/X11Helper.cpp index e7d1335742..37c2a1dd98 100644 --- a/stepmania/src/archutils/Unix/X11Helper.cpp +++ b/stepmania/src/archutils/Unix/X11Helper.cpp @@ -19,8 +19,8 @@ static bool g_bHaveWin = false; Display *X11Helper::Dpy = NULL; Window X11Helper::Win; -int protoErrorCallback( Display*, XErrorEvent* ); -int protoFatalCallback( Display* ); +static int protoErrorCallback( Display*, XErrorEvent* ); +static int protoFatalCallback( Display* ); bool X11Helper::Go() { @@ -34,7 +34,6 @@ bool X11Helper::Go() XSetErrorHandler( &protoErrorCallback ); } g_iRefCount++; - return true; } @@ -50,29 +49,28 @@ void X11Helper::Stop() } } -static bool pApplyMasks(); +static void pApplyMasks(); -bool X11Helper::OpenMask( long mask ) +void X11Helper::OpenMask( long mask ) { g_aiMasks.push_back(mask); - return pApplyMasks(); + pApplyMasks(); } -bool X11Helper::CloseMask( long mask ) +void X11Helper::CloseMask( long mask ) { vector::iterator i = find( g_aiMasks.begin(), g_aiMasks.end(), mask ); if( i == g_aiMasks.end() ) - return true; + return; g_aiMasks.erase( i ); - - return pApplyMasks(); + pApplyMasks(); } -static bool pApplyMasks() +static void pApplyMasks() { if( X11Helper::Dpy == NULL || !g_bHaveWin ) - return true; + return; LOG->Trace("X11Helper: Reapplying event masks."); @@ -80,10 +78,7 @@ static bool pApplyMasks() for( unsigned i = 0; i < g_aiMasks.size(); ++i ) iMask |= g_aiMasks[i]; - if( XSelectInput(X11Helper::Dpy, X11Helper::Win, iMask) == 0 ) - return false; - - return true; + XSelectInput( X11Helper::Dpy, X11Helper::Win, iMask ); } bool X11Helper::MakeWindow( int screenNum, int depth, Visual *visual, int width, int height, bool overrideRedirect ) diff --git a/stepmania/src/archutils/Unix/X11Helper.h b/stepmania/src/archutils/Unix/X11Helper.h index 0ba29c7991..9228fb3df0 100644 --- a/stepmania/src/archutils/Unix/X11Helper.h +++ b/stepmania/src/archutils/Unix/X11Helper.h @@ -15,6 +15,10 @@ namespace X11Helper // internal session-tracking stuff (so you should call this anyway). bool Go(); + // Destroy the connection, if appropriate; otherwise do some important + // internal session-tracking stuff (so you should call it anyway). + void Stop(); + // The current Display (connection). Initialized by the first call to // Go(). extern Display *Dpy; @@ -34,15 +38,11 @@ namespace X11Helper // Unmask one X event type mask thingy (XSelectInput() arg 3) on the // current window. Masked/unmasked events will carry between windows. - bool OpenMask(long mask); + void OpenMask( long mask ); // (Re)mask one X event type mask thingy (XSelectInput() arg 3) on the // current window. Masked/unmasked events will carry between windows. - bool CloseMask(long mask); - - // Destroy the connection, if appropriate; otherwise do some important - // internal session-tracking stuff (so you should call it anyway). - void Stop(); + void CloseMask( long mask ); }; #endif