This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch 3.5.0.x in repository nx-libs. from a88fc71 Only use the first three numbers in the full version for current_version on OS X. ld(1) on 10.6 fails otherwise. new 52224aa nx-X11: handle source pictures (those without a Drawable surface) gracefully. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 + .../0017_nx-X11_fix-SetPictureFilter.full.patch | 179 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 184 insertions(+) create mode 100644 debian/patches/0017_nx-X11_fix-SetPictureFilter.full.patch -- Alioth's /srv/git/code.x2go.org/nx-libs.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.5.0.x in repository nx-libs. commit 52224aa87ce2966ded505647ce9fab83541a820e Author: Mihai Moldovan <ionic@ionic.de> Date: Sun Mar 29 04:21:59 2015 +0200 nx-X11: handle source pictures (those without a Drawable surface) gracefully. Adds: - 0017_nx-X11_fix-SetPictureFilter.full.patch --- debian/changelog | 4 + .../0017_nx-X11_fix-SetPictureFilter.full.patch | 179 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 184 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3d58ed9..bb1b711 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,10 @@ nx-libs (2:3.5.0.32-0x2go1) UNRELEASED; urgency=low - 0420_nxcomp_use-correct-library-naming-scheme-on-OS-X.full+lite.patch - 0620_nxcompext_use-correct-library-naming-scheme-on-OS-X.full.patch - 0621_nxcompshad_use-correct-library-naming-scheme-on-OS-X.full.patch + * nx-X11: handle source pictures (those without a Drawable surface) + gracefully. + Adds: + - 0017_nx-X11_fix-SetPictureFilter.full.patch -- X2Go Release Manager <git-admin@x2go.org> Tue, 17 Mar 2015 19:19:32 +0100 diff --git a/debian/patches/0017_nx-X11_fix-SetPictureFilter.full.patch b/debian/patches/0017_nx-X11_fix-SetPictureFilter.full.patch new file mode 100644 index 0000000..cf24681 --- /dev/null +++ b/debian/patches/0017_nx-X11_fix-SetPictureFilter.full.patch @@ -0,0 +1,179 @@ +Description: Handle source pictures (those without a Drawable surface) gracefully. +Author: Mihai Moldovan <ionic@ionic.de> +Abstract: + This is basically a merge of the most current xorg-server (1.17.1) code into + nx-X11. + . + It makes sure that for source pictures, which do not have a drawable surface, + a filter is selected that is supported on the "main" and all other screens. + Alternatively, if the requested filter is not available on all screens and + the picture is a source picture, this function fails gracefully. + . + Additionally, the ChangePictureFilter hook is now called for non-source + pictures. + . + This also needs an implementation in mipict.{c,h}. The default hook does + nothing and returns a success value. + +--- a/nx-X11/programs/Xserver/render/filter.c ++++ b/nx-X11/programs/Xserver/render/filter.c +@@ -271,33 +271,69 @@ PictureResetFilters (ScreenPtr pScreen) + int + SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams) + { +- ScreenPtr pScreen = pPicture->pDrawable->pScreen; +- PictFilterPtr pFilter = PictureFindFilter (pScreen, name, len); +- xFixed *new_params; +- int i; ++ ScreenPtr pScreen; ++ PictFilterPtr pFilter; ++ xFixed *new_params; ++ int i; ++ ++ if (pPicture->pDrawable) { ++ pScreen = pPicture->pDrawable->pScreen; ++ } ++ else { ++ pScreen = screenInfo.screens[0]; ++ } ++ ++ pFilter = PictureFindFilter (pScreen, name, len); + + if (!pFilter) +- return BadName; +- if (pFilter->ValidateParams) +- { +- if (!(*pFilter->ValidateParams) (pPicture, pFilter->id, params, nparams)) +- return BadMatch; +- } +- else if (nparams) +- return BadMatch; +- +- if (nparams != pPicture->filter_nparams) +- { +- new_params = xalloc (nparams * sizeof (xFixed)); +- if (!new_params) +- return BadAlloc; +- xfree (pPicture->filter_params); +- pPicture->filter_params = new_params; +- pPicture->filter_nparams = nparams; ++ return BadName; ++ ++ if (!pPicture->pDrawable) { ++ int s; ++ ++ /* For source pictures, the picture isn't tied to a screen. So, ensure ++ * that all screens can handle a filter we set for the picture. ++ */ ++ for (s = 1; s < screenInfo.numScreens; s++) { ++ PictFilterPtr pScreenFilter; ++ ++ pScreenFilter = PictureFindFilter(screenInfo.screens[s], name, len); ++ if (!pScreenFilter || pScreenFilter->id != pFilter->id) ++ return BadMatch; ++ } ++ } ++ ++ if (pFilter->ValidateParams) { ++ if (!(*pFilter->ValidateParams) (pPicture, pFilter->id, params, nparams)) ++ return BadMatch; ++ } ++ else if (nparams) { ++ return BadMatch; ++ } ++ ++ if (nparams != pPicture->filter_nparams) { ++ new_params = xalloc (nparams * sizeof (xFixed)); ++ ++ if (!new_params && nparams) ++ return BadAlloc; ++ xfree (pPicture->filter_params); ++ pPicture->filter_params = new_params; ++ pPicture->filter_nparams = nparams; + } + for (i = 0; i < nparams; i++) +- pPicture->filter_params[i] = params[i]; ++ pPicture->filter_params[i] = params[i]; + pPicture->filter = pFilter->id; ++ ++ if (pPicture->pDrawable) { ++ PictureScreenPtr ps = GetPictureScreen (pscreen); ++ int result; ++ ++ result = (*ps->ChangePictureFilter) (pPicture, pPicture->filter, ++ params, nparams); ++ ++ return result; ++ } + pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT; ++ + return Success; + } +--- a/nx-X11/programs/Xserver/render/picturestr.h ++++ b/nx-X11/programs/Xserver/render/picturestr.h +@@ -344,7 +344,13 @@ typedef struct _PictureScreen { + int nfilterAliases; + + ChangePictureTransformProcPtr ChangePictureTransform; ++ ++ /** ++ * Called immediately after a picture's transform is changed through the ++ * SetPictureFilter request. Not called for source-only pictures. ++ */ + ChangePictureFilterProcPtr ChangePictureFilter; ++ + DestroyPictureFilterProcPtr DestroyPictureFilter; + + TrapezoidsProcPtr Trapezoids; +--- a/nx-X11/programs/Xserver/render/mipict.c ++++ b/nx-X11/programs/Xserver/render/mipict.c +@@ -250,6 +250,22 @@ miValidatePicture (PicturePtr pPicture, + } + } + ++int ++miChangePictureTransform (PicturePtr pPicture, ++ PictTransform *transform) ++{ ++ return Success; ++} ++ ++int ++miChangePictureFilter (PicturePtr pPicture, ++ int filter, ++ xFixed *params, ++ int nparams) ++{ ++ return Success; ++} ++ + #define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v)) + + static __inline Bool +@@ -611,6 +627,8 @@ miPictureInit (ScreenPtr pScreen, PictFo + ps->InitIndexed = miInitIndexed; + ps->CloseIndexed = miCloseIndexed; + ps->UpdateIndexed = miUpdateIndexed; ++ ps->ChangePictureTransform = miChangePictureTransform; ++ ps->ChangePictureFilter = miChangePictureFilter; + + /* MI rendering routines */ + ps->Composite = 0; /* requires DDX support */ +--- a/nx-X11/programs/Xserver/render/mipict.h ++++ b/nx-X11/programs/Xserver/render/mipict.h +@@ -71,6 +71,15 @@ void + miValidatePicture (PicturePtr pPicture, + Mask mask); + ++int ++miChangePictureTransform (PicturePtr pPicture, ++ PictTransform *transform); ++ ++int ++miChangePictureFilter (PicturePtr pPicture, ++ int filter, ++ xFixed *params, ++ int nparams); + + Bool + miClipPicture (RegionPtr pRegion, diff --git a/debian/patches/series b/debian/patches/series index 4ad233c..c6c6b64 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,6 +14,7 @@ 0014_nxcompshad_makefile-uninstall+autoconf.full.patch 0015_nxproxy_makefile-uninstall.full+lite.patch 0016_nx-X11_install-location.full.patch +0017_nx-X11_fix-SetPictureFilter.full.patch 0024_fix-make-clean.full.patch 0024_fix-make-clean.full+lite.patch 0025_nxcomp-fix-ftbfs-against-jpeg9a.full+lite.patch -- Alioth's /srv/git/code.x2go.org/nx-libs.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git