mirror of https://github.com/AxioDL/boo.git
Fix Xlib window intialization
This commit is contained in:
parent
d013f1e25c
commit
9160423fe8
|
@ -390,24 +390,19 @@ public:
|
||||||
XFree(visualList);
|
XFree(visualList);
|
||||||
|
|
||||||
/* Create colormap */
|
/* Create colormap */
|
||||||
m_colormapId = XCreateColormap(m_xDisp, m_windowId, selectedVisual, AllocNone);
|
m_colormapId = XCreateColormap(m_xDisp, screen->root, selectedVisual, AllocNone);
|
||||||
|
|
||||||
/* Create window */
|
/* Create window */
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
genFrameDefault(screen, &x, &y, &w, &h);
|
genFrameDefault(screen, &x, &y, &w, &h);
|
||||||
XSetWindowAttributes valueMasks[] =
|
XSetWindowAttributes swa;
|
||||||
{
|
swa.colormap = m_colormapId;
|
||||||
0,
|
swa.border_pixmap = None;
|
||||||
KeyPressMask | KeyReleaseMask |
|
swa.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ExposureMask | StructureNotifyMask;
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
|
||||||
PointerMotionMask | ExposureMask |
|
|
||||||
StructureNotifyMask,
|
|
||||||
m_colormapId,
|
|
||||||
0
|
|
||||||
};
|
|
||||||
m_windowId = XCreateWindow(display, screen->root, x, y, w, h, 10,
|
m_windowId = XCreateWindow(display, screen->root, x, y, w, h, 10,
|
||||||
CopyFromParent, CopyFromParent, selectedVisual,
|
CopyFromParent, CopyFromParent, selectedVisual,
|
||||||
CWBorderPixel | CWEventMask | CWColormap, valueMasks);
|
CWBorderPixel | CWEventMask | CWColormap, &swa);
|
||||||
|
|
||||||
|
|
||||||
/* The XInput 2.1 extension enables per-pixel smooth scrolling trackpads */
|
/* The XInput 2.1 extension enables per-pixel smooth scrolling trackpads */
|
||||||
|
|
Loading…
Reference in New Issue