mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02:00
Fixed display corruption
This commit is contained in:
parent
e940747528
commit
9d20580082
3 changed files with 25 additions and 29 deletions
|
|
@ -49,7 +49,6 @@ Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
XCBCURSOR c;
|
||||
unsigned long valuemask;
|
||||
XCBParamsGC values;
|
||||
#if 0
|
||||
valuemask = XCBGCFunction |
|
||||
XCBGCPlaneMask |
|
||||
XCBGCForeground |
|
||||
|
|
@ -87,7 +86,7 @@ Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
size = (((pCursor->bits->width + pad - 1) & -pad) >> 3) * pCursor->bits->height;
|
||||
d.pixmap = source;
|
||||
XCBPutImage(xnestConnection,
|
||||
XCBImageFormatZPixmap,
|
||||
XCBImageFormatXYBitmap,
|
||||
d,
|
||||
xnestBitmapGC,
|
||||
pCursor->bits->width,
|
||||
|
|
@ -99,7 +98,7 @@ Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
pCursor->bits->source); /*bits*/
|
||||
d.pixmap = mask;
|
||||
XCBPutImage(xnestConnection,
|
||||
XCBImageFormatZPixmap,
|
||||
XCBImageFormatXYBitmap,
|
||||
d,
|
||||
xnestBitmapGC,
|
||||
pCursor->bits->width,
|
||||
|
|
@ -109,9 +108,7 @@ Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
1, /*depth*/
|
||||
size, /*length..correct??*/
|
||||
pCursor->bits->mask); /*bits*/
|
||||
#endif
|
||||
pCursor->devPriv[pScreen->myNum] = (pointer)xalloc(sizeof(xnestPrivCursor));
|
||||
#if 0
|
||||
c = XCBCURSORNew(xnestConnection);
|
||||
xnestCursorPriv(pCursor, pScreen)->cursor = c.xid;
|
||||
XCBCreateCursor(xnestConnection,
|
||||
|
|
@ -129,7 +126,6 @@ Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
|
||||
XCBFreePixmap(xnestConnection, source);
|
||||
XCBFreePixmap(xnestConnection, mask);
|
||||
#endif
|
||||
return True;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,6 @@ void xnestCollectEvents()
|
|||
XCBFontError *fe;
|
||||
XCBWindowError *we;
|
||||
|
||||
e = XCBWaitForEvent(xnestConnection);
|
||||
while ((e = XCBPollForEvent(xnestConnection, NULL)) != NULL) {
|
||||
if (!e->response_type) {
|
||||
err = (XCBGenericError *)e;
|
||||
|
|
@ -278,9 +277,10 @@ void xnestCollectEvents()
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else {
|
||||
ErrorF("Handling event %x(%d) serial %d\n", e->response_type, e->response_type, e->sequence);
|
||||
xnestHandleEvent(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,26 +76,26 @@ void xnestQueryBestSize(int class, unsigned short *pWidth, unsigned short *pHeig
|
|||
void xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||
int w, int h, int leftPad, int format, char *pImage)
|
||||
{
|
||||
XCBImage *img;
|
||||
img = XCBImageCreate(xnestConnection,
|
||||
depth,
|
||||
format,
|
||||
0, /*offset*/
|
||||
(BYTE *)pImage,
|
||||
w, h,
|
||||
leftPad,
|
||||
0 /*bytes_per_line, initialized in XCBImageInit*/);
|
||||
if (img) {
|
||||
XCBImageInit(img);
|
||||
XCBImagePut(xnestConnection,
|
||||
xnestDrawable(pDrawable),
|
||||
xnestGC(pGC),
|
||||
img,
|
||||
0, 0, /*offsets*/
|
||||
x, y,
|
||||
w, h);
|
||||
XCBImageDestroy(img);
|
||||
}
|
||||
int size, pad;
|
||||
int bpp;
|
||||
int i;
|
||||
for (i=0; i<xnestNumPixmapFormats; i++) {
|
||||
if (xnestPixmapFormats[i].depth == depth) {
|
||||
pad = xnestPixmapFormats[i].scanline_pad;
|
||||
bpp = xnestPixmapFormats[i].bits_per_pixel;
|
||||
}
|
||||
}
|
||||
size = (((bpp * w + pad - 1) & -pad) >> 3)*h;
|
||||
XCBPutImage(xnestConnection,
|
||||
format,
|
||||
xnestDrawable(pDrawable),
|
||||
xnestGC(pGC),
|
||||
w, h,
|
||||
x, y,
|
||||
leftPad,
|
||||
depth,
|
||||
size,
|
||||
(CARD8*) pImage+leftPad);
|
||||
}
|
||||
|
||||
void xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue