2010-04-07, 11:09
i am currently doing it how xbmc does it, i.e with SDL... but alternatively, can you not create the window by this method instead? (untested!):
Code:
Display* display;
EGLDisplay sEGLDisplay;
EGLConfig FBConfig;
XSetWindowAttributes wa;
XSizeHints sh;
XEvent e;
unsigned long mask;
long screen;
XVisualInfo *visual, template;
Colormap colormap;
int vID, n;
Window window;
screen = DefaultScreen(display);
eglGetConfigAttrib(sEGLDisplay, FBConfig, EGL_NATIVE_VISUAL_ID, &vID);
template.visualid = vID;
visual = XGetVisualInfo(display, VisualIDMask, &template, &n);
colormap = XCreateColormap(display, RootWindow(display, screen), visual->visual, AllocNone);
wa.colormap = colormap;
wa.background_pixel = 0xFFFFFFFF;
wa.border_pixel = 0;
wa.event_mask = StructureNotifyMask | ExposureMask;
mask = CWBackPixel | CWBorderPixel | CWEventMask | CWColormap;
window = XCreateWindow(display, RootWindow(display, screen), 0, 0, width, height, 0, visual->depth, InputOutput, visual->visual, mask, &wa);
sh.flags = USPosition;
sh.x = 10;
sh.y = 10;
XSetStandardProperties(display, window, title, title, None, 0, 0, &sh);
XMapWindow(display, window);
XSetWMColormapWindows(display, window, &window, 1);
XFlush(display);