aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-07 07:23:20 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-07 07:23:20 +0100
commit5487d52fe1c37244c649c3aefb78600f08ffb91b (patch)
tree2d30b58a9044c67c5f844fa9bc424ef7faa4052a
parentc571aa9eda7d69b3de1647a208c685a971c9ad38 (diff)
parentaac4c5f590de3a6dacb01579848b25f6bdd3cc56 (diff)
downloadnx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.tar.gz
nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.tar.bz2
nx-libs-5487d52fe1c37244c649c3aefb78600f08ffb91b.zip
Merge branch 'uli42-pr/various_backports' into 3.6.x
Attributes GH PR #581: https://github.com/ArcticaProject/nx-libs/pull/581 Fixes: ArcticaProject/nx-libs#558 Fixes: ArcticaProject/nx-libs#541 Fixes: ArcticaProject/nx-libs#542
-rw-r--r--nx-X11/programs/Xserver/damageext/damageext.c2
-rw-r--r--nx-X11/programs/Xserver/dix/devices.c1
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw.c2
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw.h3
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c10
-rw-r--r--nx-X11/programs/Xserver/randr/rroutput.c9
-rw-r--r--nx-X11/programs/Xserver/render/picture.c1
-rw-r--r--nx-X11/programs/Xserver/xfixes/region.c1
-rw-r--r--nx-X11/programs/Xserver/xfixes/xfixes.c2
-rw-r--r--nx-X11/programs/Xserver/xkb/maprules.c7
10 files changed, 15 insertions, 23 deletions
diff --git a/nx-X11/programs/Xserver/damageext/damageext.c b/nx-X11/programs/Xserver/damageext/damageext.c
index b5e5d0b00..b9d99a53c 100644
--- a/nx-X11/programs/Xserver/damageext/damageext.c
+++ b/nx-X11/programs/Xserver/damageext/damageext.c
@@ -296,7 +296,7 @@ ProcDamageDispatch (ClientPtr client)
REQUEST(xDamageReq);
DamageClientPtr pDamageClient = GetDamageClient (client);
- if (pDamageClient->major_version > NUM_VERSION_REQUESTS)
+ if (pDamageClient->major_version >= NUM_VERSION_REQUESTS)
return BadRequest;
if (stuff->damageReqType > version_requests[pDamageClient->major_version])
return BadRequest;
diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c
index d649a8657..427169222 100644
--- a/nx-X11/programs/Xserver/dix/devices.c
+++ b/nx-X11/programs/Xserver/dix/devices.c
@@ -210,6 +210,7 @@ CloseDevice(register DeviceIntPtr dev)
if (dev->key->xkbInfo)
XkbFreeInfo(dev->key->xkbInfo);
#endif
+ dev->key->xkbInfo = NULL;
free(dev->key->curKeySyms.map);
free(dev->key->modifierKeyMap);
free(dev->key);
diff --git a/nx-X11/programs/Xserver/miext/cw/cw.c b/nx-X11/programs/Xserver/miext/cw/cw.c
index d9ca55f7e..a45c34dff 100644
--- a/nx-X11/programs/Xserver/miext/cw/cw.c
+++ b/nx-X11/programs/Xserver/miext/cw/cw.c
@@ -463,7 +463,7 @@ cwPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
DrawablePtr pBackingDrawable;
int x_off, y_off, x_screen, y_screen;
- while (pWin && pWin->backgroundState == ParentRelative)
+ while (pWin->backgroundState == ParentRelative)
pWin = pWin->parent;
pBackingDrawable = cwGetBackingDrawable((DrawablePtr)pWin, &x_off,
diff --git a/nx-X11/programs/Xserver/miext/cw/cw.h b/nx-X11/programs/Xserver/miext/cw/cw.h
index de4746be6..b8792661f 100644
--- a/nx-X11/programs/Xserver/miext/cw/cw.h
+++ b/nx-X11/programs/Xserver/miext/cw/cw.h
@@ -60,7 +60,8 @@ typedef struct {
unsigned long stateChanges;
} cwPictureRec, *cwPicturePtr;
-#define getCwPicture(pPicture) ((cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr)
+#define getCwPicture(pPicture) \
+ (pPicture->pDrawable ? (cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr : 0)
#define setCwPicture(pPicture,p) ((pPicture)->devPrivates[cwPictureIndex].ptr = (void *) (p))
extern int cwPictureIndex;
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index 7775747f8..20ab73c5b 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -89,13 +89,10 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
pScrPriv = rrGetScrPriv(pScreen);
/* make space for the crtc pointer */
- if (pScrPriv->numCrtcs)
- crtcs = reallocarray(pScrPriv->crtcs,
- pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr));
- else
- crtcs = malloc(sizeof(RRCrtcPtr));
+ crtcs = reallocarray(pScrPriv->crtcs,
+ pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr));
if (!crtcs)
- return FALSE;
+ return NULL;
pScrPriv->crtcs = crtcs;
crtc = calloc(1, sizeof(RRCrtcRec));
@@ -772,6 +769,7 @@ RRCrtcDestroyResource(void *value, XID pid)
free(crtc->gammaRed);
if (crtc->mode)
RRModeDestroy(crtc->mode);
+ free(crtc->outputs);
free(crtc);
return 1;
}
diff --git a/nx-X11/programs/Xserver/randr/rroutput.c b/nx-X11/programs/Xserver/randr/rroutput.c
index 8042b719c..9c52eaed6 100644
--- a/nx-X11/programs/Xserver/randr/rroutput.c
+++ b/nx-X11/programs/Xserver/randr/rroutput.c
@@ -74,13 +74,10 @@ RROutputCreate(ScreenPtr pScreen,
pScrPriv = rrGetScrPriv(pScreen);
- if (pScrPriv->numOutputs)
- outputs = reallocarray(pScrPriv->outputs,
- pScrPriv->numOutputs + 1, sizeof(RROutputPtr));
- else
- outputs = malloc(sizeof(RROutputPtr));
+ outputs = reallocarray(pScrPriv->outputs,
+ pScrPriv->numOutputs + 1, sizeof(RROutputPtr));
if (!outputs)
- return FALSE;
+ return NULL;
pScrPriv->outputs = outputs;
diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c
index e82319bc9..eba042903 100644
--- a/nx-X11/programs/Xserver/render/picture.c
+++ b/nx-X11/programs/Xserver/render/picture.c
@@ -982,6 +982,7 @@ static PicturePtr createSourcePicture(void)
pPicture->pDrawable = 0;
pPicture->pFormat = 0;
pPicture->pNext = 0;
+ pPicture->devPrivates = 0;
SetPictureToDefaults(pPicture);
return pPicture;
diff --git a/nx-X11/programs/Xserver/xfixes/region.c b/nx-X11/programs/Xserver/xfixes/region.c
index 31d19b5ff..18b1d3ff4 100644
--- a/nx-X11/programs/Xserver/xfixes/region.c
+++ b/nx-X11/programs/Xserver/xfixes/region.c
@@ -817,6 +817,7 @@ ProcXFixesExpandRegion (ClientPtr client)
RegionInit(&r, &pTmp[i], 0);
RegionUnion(pDestination, pDestination, &r);
}
+ free(pTmp);
}
if (ret == Success)
ret = client->noClientException;
diff --git a/nx-X11/programs/Xserver/xfixes/xfixes.c b/nx-X11/programs/Xserver/xfixes/xfixes.c
index add8d1b0e..1403be8c5 100644
--- a/nx-X11/programs/Xserver/xfixes/xfixes.c
+++ b/nx-X11/programs/Xserver/xfixes/xfixes.c
@@ -120,7 +120,7 @@ ProcXFixesDispatch (ClientPtr client)
REQUEST(xXFixesReq);
XFixesClientPtr pXFixesClient = GetXFixesClient (client);
- if (pXFixesClient->major_version > NUM_VERSION_REQUESTS)
+ if (pXFixesClient->major_version >= NUM_VERSION_REQUESTS)
return BadRequest;
if (stuff->xfixesReqType > version_requests[pXFixesClient->major_version])
return BadRequest;
diff --git a/nx-X11/programs/Xserver/xkb/maprules.c b/nx-X11/programs/Xserver/xkb/maprules.c
index 337c8634b..de52aa4b5 100644
--- a/nx-X11/programs/Xserver/xkb/maprules.c
+++ b/nx-X11/programs/Xserver/xkb/maprules.c
@@ -358,13 +358,6 @@ Bool found;
remap->num_remap= 0;
return;
}
- if (((present&PART_MASK)&(1<<OPTION))&&
- ((present&PART_MASK)!=(1<<OPTION))) {
- PR_DEBUG("Options cannot appear with other parts\n");
- PR_DEBUG("Illegal mapping ignored\n");
- remap->num_remap= 0;
- return;
- }
if (((present&COMPONENT_MASK)&(1<<KEYMAP))&&
((present&COMPONENT_MASK)!=(1<<KEYMAP))) {
PR_DEBUG("Keymap cannot appear with other components\n");