mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 02:30:13 +01:00
Fixed segfault, got a single xterm window to show up.
- Can't interact with xterm - Default background is wrong color - Extremely extremely slow opening windows. Why?
This commit is contained in:
parent
2a17338c61
commit
e940747528
5 changed files with 24 additions and 18 deletions
|
|
@ -43,6 +43,8 @@ static ColormapPtr InstalledMaps[MAXSCREENS];
|
|||
Bool xnestCreateColormap(ColormapPtr pCmap)
|
||||
{
|
||||
VisualPtr pVisual;
|
||||
XCBVISUALID vid;
|
||||
XCBSCREEN *screen;
|
||||
XCBGenericError *e;
|
||||
XCBRGB *colors;
|
||||
int i, ncolors;
|
||||
|
|
@ -56,13 +58,15 @@ Bool xnestCreateColormap(ColormapPtr pCmap)
|
|||
ncolors = pVisual->ColormapEntries;
|
||||
|
||||
pCmap->devPriv = (pointer)xalloc(sizeof(xnestPrivColormap));
|
||||
screen = XCBSetupRootsIter (XCBGetSetup (xnestConnection)).data;
|
||||
|
||||
xnestColormapPriv(pCmap)->colormap = XCBCOLORMAPNew(xnestConnection);
|
||||
vid = screen->root_visual;//pCmap->pScreen->rootVisual.id;
|
||||
XCBCreateColormap(xnestConnection,
|
||||
(pVisual->class & DynamicClass) ? AllocAll : AllocNone,
|
||||
xnestColormapPriv(pCmap)->colormap,
|
||||
xnestDefaultWindows[pCmap->pScreen->myNum],
|
||||
xnestVisual(pVisual)->visual_id);
|
||||
vid);
|
||||
|
||||
|
||||
switch (pVisual->class) {
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ void xnestCollectEvents()
|
|||
while ((e = XCBPollForEvent(xnestConnection, NULL)) != NULL) {
|
||||
if (!e->response_type) {
|
||||
err = (XCBGenericError *)e;
|
||||
ErrorF("File: %s Error: %d\n", __FILE__, err->error_code);
|
||||
ErrorF("File: %s Error: %d, Sequence %d\n", __FILE__, err->error_code, err->sequence);
|
||||
switch(err->error_code){
|
||||
case XCBMatch:
|
||||
re = (XCBRequestError *)err;
|
||||
|
|
|
|||
|
|
@ -389,10 +389,11 @@ Bool xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
|||
XCBCWEventMask,
|
||||
&xnestEventMask);
|
||||
} else {
|
||||
vid.id = pScreen->rootVisual;
|
||||
//vid.id = pScreen->rootVisual;
|
||||
vid = screen->root_visual;
|
||||
xnestDefaultWindows[pScreen->myNum] = XCBWINDOWNew(xnestConnection);
|
||||
XCBAuxCreateWindow(xnestConnection,
|
||||
pScreen->rootDepth,
|
||||
xnestDefaultDepth,
|
||||
xnestDefaultWindows[pScreen->myNum],
|
||||
screen->root,
|
||||
xnestX + POSITION_OFFSET,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ XCBVISUALTYPE *xnestVisual(VisualPtr pVisual)
|
|||
if (pVisual->class == xnestVisuals[i]->_class &&
|
||||
pVisual->bitsPerRGBValue == xnestVisuals[i]->bits_per_rgb_value &&
|
||||
pVisual->ColormapEntries == xnestVisuals[i]->colormap_entries &&
|
||||
/*pVisual->nplanes == xnestVisuals[i]->depth && er. help*/
|
||||
pVisual->nplanes == xnestDepths[i] &&
|
||||
pVisual->redMask == xnestVisuals[i]->red_mask &&
|
||||
pVisual->greenMask == xnestVisuals[i]->green_mask &&
|
||||
pVisual->blueMask == xnestVisuals[i]->blue_mask)
|
||||
|
|
|
|||
|
|
@ -107,28 +107,29 @@ Bool xnestCreateWindow(WindowPtr pWin)
|
|||
vid.id = XCBCopyFromParent;
|
||||
}
|
||||
else { /* root windows have their own colormaps at creation time */
|
||||
vid.id = wVisual(pWin);
|
||||
vid.id = wVisual(pWin);
|
||||
visual = xnestVisualFromID(pWin->drawable.pScreen, vid);
|
||||
pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP);
|
||||
mask |= CWColormap;
|
||||
param.colormap = xnestColormap(pCmap).xid;
|
||||
vid = visual->visual_id;
|
||||
}
|
||||
}
|
||||
|
||||
xnestWindowPriv(pWin)->window = XCBWINDOWNew(xnestConnection);
|
||||
XCBAuxCreateWindow(xnestConnection,
|
||||
pWin->drawable.depth,
|
||||
xnestWindowPriv(pWin)->window,
|
||||
xnestWindowParent(pWin),
|
||||
pWin->origin.x - wBorderWidth(pWin),
|
||||
pWin->origin.y - wBorderWidth(pWin),
|
||||
pWin->drawable.width,
|
||||
pWin->drawable.height,
|
||||
pWin->borderWidth,
|
||||
pWin->drawable.class,
|
||||
vid,
|
||||
mask,
|
||||
¶m);
|
||||
pWin->drawable.depth,
|
||||
xnestWindowPriv(pWin)->window,
|
||||
xnestWindowParent(pWin),
|
||||
pWin->origin.x - wBorderWidth(pWin),
|
||||
pWin->origin.y - wBorderWidth(pWin),
|
||||
pWin->drawable.width,
|
||||
pWin->drawable.height,
|
||||
pWin->borderWidth,
|
||||
pWin->drawable.class,
|
||||
vid,
|
||||
mask,
|
||||
¶m);
|
||||
xnestWindowPriv(pWin)->parent = xnestWindowParent(pWin);
|
||||
xnestWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin);
|
||||
xnestWindowPriv(pWin)->y = pWin->origin.y - wBorderWidth(pWin);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue