diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2024-04-09 22:19:50 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2024-05-11 18:53:27 +0200 |
commit | 9df98ab60498dd7d361abb9b534acf9fb1f3ce44 (patch) | |
tree | 3350e187a22e8a40555f208b6767436f1c16ebda /nx-X11/programs/Xserver/hw | |
parent | ac45ae3bfec21cc28ea15b34bb6c524c9919b2f4 (diff) | |
download | nx-libs-9df98ab60498dd7d361abb9b534acf9fb1f3ce44.tar.gz nx-libs-9df98ab60498dd7d361abb9b534acf9fb1f3ce44.tar.bz2 nx-libs-9df98ab60498dd7d361abb9b534acf9fb1f3ce44.zip |
NXglyphcurs.c: mark NX changes
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c | 25 |
1 files changed, 25 insertions, 0 deletions
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", |