aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-02-05 12:14:39 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-02-05 12:14:39 +0100
commit995350d14335d8b5ef52dba47c7ae8d942901b10 (patch)
treef3aa5fa6785d5d7e9750b0c1a96588c00dc91875
parentef0a3d636681a0cb46b29eb2c1e20c55b68ce2fb (diff)
parent9fb582f420b5ad5d1f23a287bd74b3ff6b462f90 (diff)
downloadnx-libs-995350d14335d8b5ef52dba47c7ae8d942901b10.tar.gz
nx-libs-995350d14335d8b5ef52dba47c7ae8d942901b10.tar.bz2
nx-libs-995350d14335d8b5ef52dba47c7ae8d942901b10.zip
Merge branch 'uli42-pr/shm_missing_code' into 3.6.x
Attributes GH PR #655: https://github.com/ArcticaProject/nx-libs/pull/655
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXshm.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
index 2ffca8066..fd74fadc3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
@@ -349,12 +349,26 @@ ProcShmPutImage(client)
fprintf(stderr, "ProcShmPutImage: Calling (*shmFuncs[pDraw->pScreen->myNum]->PutImage)().\n");
#endif
- (*shmFuncs[pDraw->pScreen->myNum]->PutImage)(
- pDraw, pGC, stuff->depth, stuff->format,
- stuff->totalWidth, stuff->totalHeight,
- stuff->srcX, stuff->srcY,
- stuff->srcWidth, stuff->srcHeight,
- stuff->dstX, stuff->dstY,
+ if ((((stuff->format == ZPixmap) && (stuff->srcX == 0)) ||
+ ((stuff->format != ZPixmap) &&
+ (stuff->srcX < screenInfo.bitmapScanlinePad) &&
+ ((stuff->format == XYBitmap) ||
+ ((stuff->srcY == 0) &&
+ (stuff->srcHeight == stuff->totalHeight))))) &&
+ ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth))
+ (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth,
+ stuff->dstX, stuff->dstY,
+ stuff->totalWidth, stuff->srcHeight,
+ stuff->srcX, stuff->format,
+ shmdesc->addr + stuff->offset +
+ (stuff->srcY * length));
+ else
+ (*shmFuncs[pDraw->pScreen->myNum]->PutImage)(
+ pDraw, pGC, stuff->depth, stuff->format,
+ stuff->totalWidth, stuff->totalHeight,
+ stuff->srcX, stuff->srcY,
+ stuff->srcWidth, stuff->srcHeight,
+ stuff->dstX, stuff->dstY,
shmdesc->addr + stuff->offset);
if (stuff->sendEvent)
@@ -364,7 +378,6 @@ ProcShmPutImage(client)
memset(&ev, 0, sizeof(xShmCompletionEvent));
ev.type = ShmCompletionCode;
ev.drawable = stuff->drawable;
- ev.sequenceNumber = client->sequence;
ev.minorEvent = X_ShmPutImage;
ev.majorEvent = ShmReqCode;
ev.shmseg = stuff->shmseg;