Xnest: use xcb_put_image() for PutImage requests
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
6684b2b2af
commit
dbf6a04f8f
|
@ -27,6 +27,7 @@ is" without express or implied warranty.
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
|
|
||||||
#include "Xnest.h"
|
#include "Xnest.h"
|
||||||
|
#include "xnest-xcb.h"
|
||||||
|
|
||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
|
@ -78,19 +79,19 @@ void
|
||||||
xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
int w, int h, int leftPad, int format, char *pImage)
|
int w, int h, int leftPad, int format, char *pImage)
|
||||||
{
|
{
|
||||||
XImage *ximage;
|
xcb_put_image(xnestUpstreamInfo.conn,
|
||||||
|
format,
|
||||||
ximage = XCreateImage(xnestDisplay, xnestDefaultVisual(pDrawable->pScreen),
|
xnestDrawable(pDrawable),
|
||||||
depth, format, leftPad, (char *) pImage,
|
xnest_upstream_gc(pGC),
|
||||||
w, h, BitmapPad(xnestDisplay),
|
w,
|
||||||
(format == ZPixmap) ?
|
h,
|
||||||
PixmapBytePad(w, depth) : BitmapBytePad(w + leftPad));
|
x,
|
||||||
|
y,
|
||||||
if (ximage) {
|
leftPad,
|
||||||
XPutImage(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
|
depth,
|
||||||
ximage, 0, 0, x, y, w, h);
|
(format == XCB_IMAGE_FORMAT_Z_PIXMAP ? PixmapBytePad(w, depth)
|
||||||
XFree(ximage);
|
: BitmapBytePad(w + leftPad)) * h,
|
||||||
}
|
(uint8_t*)pImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue