diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-13 14:14:26 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-13 14:18:50 +0100 |
commit | 1e5ee575d4912665dd2356681f0827d5229fa1f5 (patch) | |
tree | 31db7768b2686507a5f9ea2ffa03d9c62ccf78c9 /doc/nx-X11_vs_XOrg69_patches/NXglyphcurs.c.NX.patch | |
parent | 1fd8551f1632efbc2655c9293087bba08cf2f0c9 (diff) | |
download | nx-libs-1e5ee575d4912665dd2356681f0827d5229fa1f5.tar.gz nx-libs-1e5ee575d4912665dd2356681f0827d5229fa1f5.tar.bz2 nx-libs-1e5ee575d4912665dd2356681f0827d5229fa1f5.zip |
nx-X11 vs. X.Org 6.9 patches for further studying / documentation
NoMachine kept all original X.Org 6.9 files in the nx-X11 source
tree. These files have been removed in Feb 2015 during a major
code cleanup.
For later studying we provide all diffs of the changes that
NoMachine employed on the original X.Org X11 code tree in the
doc/nx-X11_vs_XOrg69_patches folder.
Diffstat (limited to 'doc/nx-X11_vs_XOrg69_patches/NXglyphcurs.c.NX.patch')
-rw-r--r-- | doc/nx-X11_vs_XOrg69_patches/NXglyphcurs.c.NX.patch | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/doc/nx-X11_vs_XOrg69_patches/NXglyphcurs.c.NX.patch b/doc/nx-X11_vs_XOrg69_patches/NXglyphcurs.c.NX.patch new file mode 100644 index 000000000..c8d302c97 --- /dev/null +++ b/doc/nx-X11_vs_XOrg69_patches/NXglyphcurs.c.NX.patch @@ -0,0 +1,121 @@ +--- ./nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c.X.original 2015-02-13 14:03:44.744441510 +0100 ++++ ./nx-X11/programs/Xserver/hw/nxagent/X/NXglyphcurs.c 2015-02-10 19:13:13.808685737 +0100 +@@ -1,3 +1,20 @@ ++/**************************************************************************/ ++/* */ ++/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */ ++/* */ ++/* NXAGENT, NX protocol compression and NX extensions to this software */ ++/* are copyright of NoMachine. Redistribution and use of the present */ ++/* software is allowed according to terms specified in the file LICENSE */ ++/* which comes in the source distribution. */ ++/* */ ++/* Check http://www.nomachine.com/licensing.html for applicability. */ ++/* */ ++/* NX and NoMachine are trademarks of Medialogic S.p.A. */ ++/* */ ++/* All rights reserved. */ ++/* */ ++/**************************************************************************/ ++ + /************************************************************************ + + Copyright 1987, 1998 The Open Group +@@ -62,6 +79,12 @@ + #include "opaque.h" + #include "servermd.h" + ++#include "../../fb/fb.h" ++#include "Pixmaps.h" ++ ++#ifndef True ++#define True 1 ++#endif + + /* + get the bits out of the font in a portable way. to avoid +@@ -98,44 +121,68 @@ + /* zeroing the (pad) bits seems to help some ddx cursor handling */ + bzero(pbits, nby); + +- ppix = (PixmapPtr)(*pScreen->CreatePixmap)(pScreen, cm->width, +- cm->height, 1); ++ ppix = fbCreatePixmap(pScreen, cm->width, cm->height, 1); + pGC = GetScratchGC(1, pScreen); + if (!ppix || !pGC) + { + if (ppix) +- (*pScreen->DestroyPixmap)(ppix); ++ fbDestroyPixmap(ppix); + if (pGC) + FreeScratchGC(pGC); + xfree(pbits); + return BadAlloc; + } + ++ #ifdef TEST ++ fprintf(stderr, "ServerBitsFromGlyph: Created virtual pixmap at [%p] with width [%d] height [%d] depth [%d].\n", ++ (void *) ppix, cm->width, cm->height, 1); ++ #endif ++ ++ nxagentPixmapPriv(ppix) -> id = 0; ++ nxagentPixmapPriv(ppix) -> mid = 0; ++ nxagentPixmapPriv(ppix) -> isVirtual = True; ++ nxagentPixmapPriv(ppix) -> pRealPixmap = NULL; ++ nxagentPixmapPriv(ppix) -> pVirtualPixmap = NULL; ++ + rect.x = 0; + rect.y = 0; + rect.width = cm->width; + rect.height = cm->height; + +- /* fill the pixmap with 0 */ +- gcval[0].val = GXcopy; +- gcval[1].val = 0; +- gcval[2].ptr = (pointer)pfont; +- dixChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, +- NULL, gcval); ++ pGC->stateChanges |= GCFunction | GCForeground | GCFont; ++ pGC->alu = GXcopy; ++ ++ pGC->fgPixel = 0; ++ ++ pfont->refcnt++; ++ ++ if (pGC->font) ++ CloseFont(pGC->font, (Font)0); ++ ++ pGC->font = pfont; ++ + ValidateGC((DrawablePtr)ppix, pGC); +- (*pGC->ops->PolyFillRect)((DrawablePtr)ppix, pGC, 1, &rect); ++ fbPolyFillRect((DrawablePtr)ppix, pGC, 1, &rect); + + /* draw the glyph */ + gcval[0].val = 1; +- dixChangeGC(NullClient, pGC, GCForeground, NULL, gcval); ++ pGC->fgPixel = 1; ++ ++ pGC->stateChanges |= GCForeground; ++ + ValidateGC((DrawablePtr)ppix, pGC); +- (*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); ++ 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); + *ppbits = (unsigned char *)pbits; + FreeScratchGC(pGC); +- (*pScreen->DestroyPixmap)(ppix); ++ fbDestroyPixmap(ppix); ++ ++ #ifdef TEST ++ fprintf(stderr, "ServerBitsFromGlyph: Destroyed virtual pixmap at [%p].\n", ++ (void *) ppix); ++ #endif ++ + return Success; + } + |