Whoops, forgot an initializer, and forgot to destroy the old window...
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
#include "RageDisplay.h" // RageDisplay
|
#include "RageDisplay.h" // RageDisplay
|
||||||
|
|
||||||
list<long> pMasks; // Currently open masks
|
list<long> pMasks; // Currently open masks
|
||||||
Display *pDpy; // Running X connection
|
Display *pDpy = NULL; // Running X connection
|
||||||
Window *pWin = NULL; // Current window
|
Window *pWin = NULL; // Current window
|
||||||
unsigned short int pCt = 0; // Number of subsystems using
|
unsigned short int pCt = 0; // Number of subsystems using
|
||||||
// the X connection
|
// the X connection
|
||||||
@@ -88,9 +88,17 @@ bool X11Helper::MakeWindow(int screenNum, int depth, Visual *visual int width=64
|
|||||||
|
|
||||||
if(pDpy == NULL) { return false; }
|
if(pDpy == NULL) { return false; }
|
||||||
|
|
||||||
|
if(pWin != NULL) { XDestroyWindow(pDpy, pWin); pWin = NULL; }
|
||||||
|
|
||||||
XSetWindowAttributes winAttribs;
|
XSetWindowAttributes winAttribs;
|
||||||
|
|
||||||
winAttribs.border_pixel = 0;
|
winAttribs.border_pixel = 0;
|
||||||
|
winAttribs.event_mask = 0;
|
||||||
|
i = 0;
|
||||||
|
while(i < pMasks.size() )
|
||||||
|
{
|
||||||
|
winAttribs.event_mask |= pMasks[i];
|
||||||
|
}
|
||||||
|
|
||||||
// XXX: Error catching/handling?
|
// XXX: Error catching/handling?
|
||||||
|
|
||||||
@@ -101,7 +109,7 @@ bool X11Helper::MakeWindow(int screenNum, int depth, Visual *visual int width=64
|
|||||||
height, 0, depth, InputOutput, visual,
|
height, 0, depth, InputOutput, visual,
|
||||||
CWBorderPixel | CWColorMap | CWEventMask, &winAttribs);
|
CWBorderPixel | CWColorMap | CWEventMask, &winAttribs);
|
||||||
|
|
||||||
return pApplyMasks();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void X11Helper::Stop()
|
void X11Helper::Stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user