aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Image.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-06 00:53:06 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-06 00:53:06 +0100
commit67599026d01692c52276df6ff5e8332d2413c18f (patch)
treeb93b8d6643dd6438f0844d48008d6cb9ffee405f /nx-X11/programs/Xserver/hw/nxagent/Image.c
parent5a8f1e921b4cafedc9efac22d5fbd2ce05e45ba9 (diff)
parentcf8797c3c0e9623e5092a2c9f5ea7cb31bc11657 (diff)
downloadnx-libs-67599026d01692c52276df6ff5e8332d2413c18f.tar.gz
nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.tar.bz2
nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.zip
Merge branch 'uli42-pr/various3' into 3.6.x
Attributes GH PR #880: https://github.com/ArcticaProject/nx-libs/pull/880
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Image.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index 34d5cf9f9..9e50b5d60 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -99,6 +99,7 @@ extern void nxagentBitOrderInvert(unsigned char *, int);
extern void nxagentTwoByteSwap(unsigned char *, register int);
extern void nxagentFourByteSwap(register unsigned char *, register int);
+extern ClientPtr nxagentRequestingClient;
/*
* Store the last visual used to unpack the images for the given
* client.
@@ -140,9 +141,7 @@ static char *nxagentImageCopy(XImage *source, XImage *destination);
* expensive than a copy.
*/
-#define nxagentNeedCache(image, method) \
-\
- ((method) != PACK_BITMAP_16M_COLORS)
+#define nxagentNeedCache(image, method) ((method) != PACK_BITMAP_16M_COLORS)
/*
* With the bitmap encoding, if the image is 32 bits-per-pixel the 4th
@@ -276,6 +275,7 @@ int nxagentImagePad(int width, int format, int leftPad, int depth)
else if (format == XYPixmap)
{
line = BitmapBytePad(width + leftPad);
+ /* FIXME: shouldn't we multiply by depth here like in nxagentImageLength? */
}
else if (format == ZPixmap)
{
@@ -1074,7 +1074,7 @@ void nxagentPutSubImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
/*
FIXME: Should use an unpack resource here.
*/
- client = requestingClient;
+ client = nxagentRequestingClient;
if (client == NULL)
{
@@ -1093,7 +1093,7 @@ FIXME: Should use an unpack resource here.
#ifdef TEST
fprintf(stderr, "nxagentPutSubImage: Display image order is [%d] bitmap order is [%d].\n",
- ImageByteOrder(nxagentDisplay), nxagentBitmapBitOrder(nxagentDisplay));
+ ImageByteOrder(nxagentDisplay), BitmapBitOrder(nxagentDisplay));
#endif
/*
@@ -1559,7 +1559,6 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio,
XImage **pImage, int *scaledx, int *scaledy)
{
XImage *image = *pImage;
-
if (image == NULL)
{
return 0;