xserver: Branch 'orib-soc-2006'
Ori Bernstein
orib at kemper.freedesktop.org
Fri Jun 16 01:28:25 EEST 2006
hw/xnest/Color.c | 6 +++++-
hw/xnest/Events.c | 2 +-
hw/xnest/Screen.c | 5 +++--
hw/xnest/Visual.c | 2 +-
hw/xnest/Window.c | 27 ++++++++++++++-------------
5 files changed, 24 insertions(+), 18 deletions(-)
New commits:
diff-tree e9407475283fe838b91d32bb43c9b0fc9dbe7fa9 (from 2a17338c611ed2c294062797deaa6e5886f47374)
Author: Ori Bernstein <rand.chars at gmail.com>
Date: Thu Jun 15 18:34:23 2006 -0500
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?
diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c
index 2530baf..8af75d2 100644
--- a/hw/xnest/Color.c
+++ b/hw/xnest/Color.c
@@ -43,6 +43,8 @@ static ColormapPtr InstalledMaps[MAXSCRE
Bool xnestCreateColormap(ColormapPtr pCmap)
{
VisualPtr pVisual;
+ XCBVISUALID vid;
+ XCBSCREEN *screen;
XCBGenericError *e;
XCBRGB *colors;
int i, ncolors;
@@ -56,13 +58,15 @@ Bool xnestCreateColormap(ColormapPtr pCm
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) {
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index c6a3cf6..62d6682 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -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;
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index e33e666..56af6d9 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -389,10 +389,11 @@ Bool xnestOpenScreen(int index, ScreenPt
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,
diff --git a/hw/xnest/Visual.c b/hw/xnest/Visual.c
index 6bdd843..eca3fa6 100644
--- a/hw/xnest/Visual.c
+++ b/hw/xnest/Visual.c
@@ -38,7 +38,7 @@ XCBVISUALTYPE *xnestVisual(VisualPtr pVi
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)
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index bd0f31c..6a5e6ec 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -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);
More information about the xorg-commit
mailing list