diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-05-11 12:48:36 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-05-11 12:48:36 +0200 |
commit | 45311f783acad296d37a248fb2c702c578ac3059 (patch) | |
tree | a7307f8570bc7392f3ab75c47c3b758ff9a5d00d | |
parent | 4372dfa53207a3247b8c317392f2672191b54fdf (diff) | |
download | nx-libs-45311f783acad296d37a248fb2c702c578ac3059.tar.gz nx-libs-45311f783acad296d37a248fb2c702c578ac3059.tar.bz2 nx-libs-45311f783acad296d37a248fb2c702c578ac3059.zip |
Add patch: 120_nxagent_libcairo-null-source-drawables.full.patch, solves crashes of GTK applications based on libcairo 1.12.1+.
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches/120_nxagent_libcairo-null-source-drawables.full.patch | 130 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 136 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index da4999c82..143717e5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ nx-libs (2:3.5.0.13-0) UNRELEASED; urgency=low + [ Mike Gabriel ] * Let nxagent Debian package depend on xfonts-base. + [ Jim Burnes ] + * Add patch: 120_nxagent_libcairo-null-source-drawables.full.patch, solves + crashes of GTK applications based on libcairo 1.12.1+. + -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 07 Mar 2012 21:01:21 +0100 nx-libs (2:3.5.0.12-0) unstable; urgency=low diff --git a/debian/patches/120_nxagent_libcairo-null-source-drawables.full.patch b/debian/patches/120_nxagent_libcairo-null-source-drawables.full.patch new file mode 100644 index 000000000..66af325bd --- /dev/null +++ b/debian/patches/120_nxagent_libcairo-null-source-drawables.full.patch @@ -0,0 +1,130 @@ +--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c ++++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c +@@ -995,6 +995,36 @@ + #endif + } + ++ ++int nxagentShouldDeferComposite(PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst) ++{ ++ ++int drawableDst; ++int linkDeferred; ++int unSyncedSrcMask; ++ ++ drawableDst = ( nxagentRenderVersionMajor == 0 && ++ nxagentRenderVersionMinor == 8 && ++ (pDst) -> pDrawable -> type == DRAWABLE_PIXMAP ++ ); ++ ++ linkDeferred = ( nxagentOption(DeferLevel) >= 2 && ++ nxagentOption(LinkType) < LINK_TYPE_ADSL ++ ); ++ ++ unSyncedSrcMask = ( nxagentOption(DeferLevel) == 1 && ++ (pDst) -> pDrawable -> type == DRAWABLE_PIXMAP && ++ ( ++ (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) || ++ ((pMask) && pMask -> pDrawable && (nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized)) ++ ) ++ ); ++ ++ ++ return drawableDst || linkDeferred || unSyncedSrcMask; ++} ++ ++ + void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, + INT16 yDst, CARD16 width, CARD16 height) +@@ -1036,8 +1066,8 @@ + } + + #endif +- +- if (NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst)) ++ /* if (NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst)) */ ++ if (nxagentShouldDeferComposite(pSrc, pMask, pDst)) + { + pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst, width, height); + +@@ -1095,7 +1125,8 @@ + } + } + +- if (pMask != NULL && pMask -> pDrawable != pSrc -> pDrawable && ++ if ((pMask) && (pMask->pDrawable) && ++ pMask -> pDrawable != pSrc -> pDrawable && + pMask -> pDrawable != pDst -> pDrawable) + { + nxagentSynchronizeShmPixmap(pMask -> pDrawable, xMask, yMask, width, height); +@@ -1259,7 +1290,7 @@ + * on the real X server. + */ + +- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized) ++ if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) + { + #ifdef TEST + fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n", +@@ -1302,14 +1333,15 @@ + nxagentSynchronizeBox(pSrc -> pDrawable, &glyphBox, NEVER_BREAK); + } + +- if (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP) ++ if (pSrc -> pDrawable && (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP)) + { + nxagentIncreasePixmapUsageCounter((PixmapPtr) pSrc -> pDrawable); + } + } + +- if (pSrc -> pDrawable != pDst -> pDrawable && +- nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized) ++ ++ if (pSrc -> pDrawable && (pSrc -> pDrawable != pDst -> pDrawable && ++ nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized)) + { + #ifdef TEST + fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p].\n", +@@ -1749,7 +1781,9 @@ + return; + } + +- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized) ++ /* the following blocks need fixing to ignore null values of pDrawable */ ++ ++ if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) + { + #ifdef TEST + fprintf(stderr, "nxagentTrapezoids: Going to synchronize the source drawable at [%p].\n", +@@ -1843,7 +1877,9 @@ + * operation like nxagentTrapezoids() does. + */ + +- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized) ++ ++ ++ if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) + { + #ifdef TEST + fprintf(stderr, "nxagentTriangles: Going to synchronize the source drawable at [%p].\n", +@@ -1920,7 +1956,8 @@ + * operation like nxagentTrapezoids() does. + */ + +- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized) ++ ++ if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) + { + #ifdef TEST + fprintf(stderr, "nxagentTriStrip: Going to synchronize the source drawable at [%p].\n", +@@ -1997,7 +2034,8 @@ + * operation like nxagentTrapezoids() does. + */ + +- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized) ++ ++ if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) + { + #ifdef TEST + fprintf(stderr, "nxagentTriFan: Going to synchronize the source drawable at [%p].\n", diff --git a/debian/patches/series b/debian/patches/series index dc42d85ed..0e7726a03 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -35,6 +35,7 @@ 108_nxagent_wine-close-delay.full.patch 109_nxagent_locale-utf8-compound-text.full.patch 110_nxagent_createpixmap-bounds-check.full.patch +120_nxagent_libcairo-null-source-drawables.full.patch 200_nxagent_check-binary-x2go-flavour.full.patch 201_nxagent_set-x2go-icon-if-x2goagent-flavour.full.patch 202_nx-x11_enable-xinerama.full.patch |