Design change -- the callback system is unnecssary, all InputHandler_X11 needs to do is unmask events, which is already available through OpenMask(). Also, a few idle formatting tweaks.

This commit is contained in:
Ben Anderson
2005-03-13 17:54:13 +00:00
parent 410da1de20
commit 62c0288f66
2 changed files with 16 additions and 39 deletions
+10 -29
View File
@@ -6,8 +6,6 @@
#include "RageDisplay.h" // RageDisplay
vector<Callback_t> pCBacks; // Callbacks for the rendering
// thread
list<long> pMasks; // Currently open masks
Display *pDpy; // Running X connection
Window *pWin = NULL; // Current window
@@ -31,6 +29,11 @@ Display *X11Helper::Dpy()
return pDpy;
}
Window& X11Helper::Win()
{
return pWin;
}
static bool pApplyMasks()
{
int i;
@@ -52,13 +55,9 @@ bool X11Helper::OpenMask(long mask)
{
pMasks.push_back(mask);
if(pWin != NULL)
{
return pApplyMasks();
}
{ return pApplyMasks(); }
else
{
return true;
}
{ return true; }
}
bool X11Helper::CloseMask(long mask)
@@ -78,13 +77,9 @@ bool X11Helper::CloseMask(long mask)
}
if(pWin != NULL)
{
return pApplyMasks();
}
{ return pApplyMasks(); }
else
{
return true;
}
{ return true; }
}
bool X11Helper::MakeWindow(int screenNum, int depth, Visual *visual int width=64, int height=64)
@@ -106,21 +101,7 @@ bool X11Helper::MakeWindow(int screenNum, int depth, Visual *visual int width=64
height, 0, depth, InputOutput, visual,
CWBorderPixel | CWColorMap | CWEventMask, &winAttribs);
i = 0;
while(i < pCBacks.size() )
{
pCBacks[i](pWin);
i++;
}
return pApplyMasks();
}
bool X11Helper::Callback(Callback_t cb)
{
pCBacks.push_back(cb);
return true;
return pApplyMasks();
}
void X11Helper::Stop()