libraries/compiz-plugins-main: Fix crash with newer X.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
M.Dinslage 2016-01-27 21:52:17 +07:00 committed by Willy Sudiarto Raharjo
parent fbd5bce35d
commit f037a9a09e
2 changed files with 133 additions and 1 deletions

View file

@ -6,7 +6,7 @@
PRGNAM=compiz-plugins-main
VERSION=${VERSION:-0.8.10}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -51,6 +51,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix crashing when animation plugin in used.
# Thanks to the fedora project for this patch
patch -p1 < $CWD/compiz-plugins-main_animation-plugin-x11-wm.patch
./autogen.sh
# Fix hardcoded checks for pango and cairo
if [ "$ARCH" = "x86_64" ]; then

View file

@ -0,0 +1,128 @@
diff -upr compiz-plugins-main-0.8.8-orig/include/compiz-animation.h compiz-plugins-main-0.8.8/include/compiz-animation.h
--- compiz-plugins-main-0.8.8-orig/include/compiz-animation.h 2011-04-21 12:20:09.000000000 +0200
+++ compiz-plugins-main-0.8.8/include/compiz-animation.h 2015-05-13 11:31:11.970670459 +0200
@@ -215,7 +215,7 @@ typedef struct _AnimBaseFunctions {
#define OPTION_GETTERS(extensionBaseFunctions, \
extensionPluginInfo, firstEffectOption) \
-static inline CompOptionValue * \
+extern inline CompOptionValue * \
animGetOptVal (CompWindow *w, \
int optionId) \
{ \
@@ -223,35 +223,35 @@ animGetOptVal (CompWindow *w, \
(w, (extensionPluginInfo), optionId - (firstEffectOption)); \
} \
\
-inline Bool \
+extern inline Bool \
animGetB (CompWindow *w, \
int optionId) \
{ \
return animGetOptVal (w, optionId)->b; \
} \
\
-inline int \
+extern inline int \
animGetI (CompWindow *w, \
int optionId) \
{ \
return animGetOptVal (w, optionId)->i; \
} \
\
-inline float \
+extern inline float \
animGetF (CompWindow *w, \
int optionId) \
{ \
return animGetOptVal (w, optionId)->f; \
} \
\
-inline char * \
+extern inline char * \
animGetS (CompWindow *w, \
int optionId) \
{ \
return animGetOptVal (w, optionId)->s; \
} \
\
-inline unsigned short * \
+extern inline unsigned short * \
animGetC (CompWindow *w, \
int optionId) \
{ \
@@ -260,23 +260,23 @@ animGetC (CompWindow *w, \
#define OPTION_GETTERS_HDR \
\
-inline Bool \
+extern inline Bool \
animGetB (CompWindow *w, \
int optionId); \
\
-inline int \
+extern inline int \
animGetI (CompWindow *w, \
int optionId); \
\
-inline float \
+extern inline float \
animGetF (CompWindow *w, \
int optionId); \
\
-inline char * \
+extern inline char * \
animGetS (CompWindow *w, \
int optionId); \
\
-inline unsigned short * \
+extern inline unsigned short * \
animGetC (CompWindow *w, \
int optionId);
diff -upr compiz-plugins-main-0.8.8-orig/src/animation/animation.c compiz-plugins-main-0.8.8/src/animation/animation.c
--- compiz-plugins-main-0.8.8-orig/src/animation/animation.c 2011-04-21 12:20:09.000000000 +0200
+++ compiz-plugins-main-0.8.8/src/animation/animation.c 2015-05-13 11:34:57.181935016 +0200
@@ -742,7 +742,7 @@ defaultUpdateWindowTransform (CompWindow
}
// Apply transform to wTransform
-inline void
+extern inline void
applyTransform (CompTransform *wTransform,
CompTransform *transform)
{
diff -upr compiz-plugins-main-0.8.8-orig/src/animation/animation-internal.h compiz-plugins-main-0.8.8/src/animation/animation-nternal.h
--- compiz-plugins-main-0.8.8-orig/src/animation/animation-internal.h 2011-04-21 12:20:09.000000000 +0200
+++ compiz-plugins-main-0.8.8/src/animation/animation-internal.h 2015-05-13 11:34:06.853428950 +0200
@@ -429,7 +429,7 @@ applyPerspectiveSkew (CompOutput *output
CompTransform *transform,
Point *center);
-inline void
+extern inline void
applyTransform (CompTransform *wTransform,
CompTransform *transform);
@@ -616,7 +616,7 @@ fxZoomInit (CompWindow * w);
void
applyZoomTransform (CompWindow * w);
-void
+extern inline void
getZoomCenterScale (CompWindow *w,
Point *pCurCenter, Point *pCurScale);
diff -upr compiz-plugins-main-0.8.8-orig/src/animation/zoomside.c compiz-plugins-main-0.8.8/src/animation/zoomside.c
--- compiz-plugins-main-0.8.8-orig/src/animation/zoomside.c 2011-04-21 12:20:09.000000000 +0200
+++ compiz-plugins-main-0.8.8/src/animation/zoomside.c 2015-05-13 11:36:15.021717714 +0200
@@ -303,7 +303,7 @@ getZoomCenterScaleFull (CompWindow *w,
*pRotateProgress = rotateProgress;
}
-inline void
+extern inline void
getZoomCenterScale (CompWindow *w,
Point *pCurCenter, Point *pCurScale)
{