From 9df98ab60498dd7d361abb9b534acf9fb1f3ce44 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 9 Apr 2024 22:19:50 +0200 Subject: NXglyphcurs.c: mark NX changes --- nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c index 0905b89fc..17344937c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c @@ -122,14 +122,24 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha /* zeroing the (pad) bits seems to help some ddx cursor handling */ bzero(pbits, nby); +#ifndef NXAGENT_SERVER + ppix = (PixmapPtr)(*pScreen->CreatePixmap)(pScreen, cm->width, + cm->height, 1, + CREATE_PIXMAP_USAGE_SCRATCH); +#else ppix = fbCreatePixmap(pScreen, cm->width, cm->height, 1, CREATE_PIXMAP_USAGE_SCRATCH); +#endif pGC = GetScratchGC(1, pScreen); if (!ppix || !pGC) { if (ppix) +#ifndef NXAGENT_SERVER + (*pScreen->DestroyPixmap)(ppix); +#else fbDestroyPixmap(ppix); +#endif if (pGC) FreeScratchGC(pGC); free(pbits); @@ -159,19 +169,34 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha dixChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, NULL, gcval); ValidateGC((DrawablePtr)ppix, pGC); +#ifndef NXAGENT_SERVER + (*pGC->ops->PolyFillRect)((DrawablePtr)ppix, pGC, 1, &rect); +#else fbPolyFillRect((DrawablePtr)ppix, pGC, 1, &rect); +#endif /* draw the glyph */ gcval[0].val = 1; dixChangeGC(NullClient, pGC, GCForeground, NULL, gcval); ValidateGC((DrawablePtr)ppix, pGC); +#ifndef NXAGENT_SERVER + (*pGC->ops->PolyText16)((DrawablePtr)ppix, pGC, cm->xhot, cm->yhot, + 1, (unsigned short *)char2b); + (*pScreen->GetImage)((DrawablePtr)ppix, 0, 0, cm->width, cm->height, + XYPixmap, 1, pbits); +#else miPolyText16((DrawablePtr)ppix, pGC, (int)cm->xhot, (int)cm->yhot, (int)1, (unsigned short*)char2b); fbGetImage((DrawablePtr)ppix, 0, 0, cm->width, cm->height, XYPixmap, 1, pbits); +#endif *ppbits = (unsigned char *)pbits; FreeScratchGC(pGC); +#ifndef NXAGENT_SERVER + (*pScreen->DestroyPixmap)(ppix); +#else fbDestroyPixmap(ppix); +#endif #ifdef TEST fprintf(stderr, "ServerBitsFromGlyph: Destroyed virtual pixmap at [%p].\n", -- cgit v1.2.3